From: "Eva Kurchatova (Virtuozzo)" <eva.kurchatova@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>, devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v4 0/3] selftests/bpf: run the xsk veth tests in a network namespace of their own
Date: Tue, 27 Oct 2026 20:50:50 +0200 [thread overview]
Message-ID: <3e89e31c-4676-486e-83ac-2f979199414f@virtuozzo.com> (raw)
In-Reply-To: <20261027-b4-prep-khorenko-vstor-150731-xsk-veth-netns-v4-0-c74cad570c70@virtuozzo.com>
On 10/27/26 20:15, Konstantin Khorenko wrote:
> Patchset for task https://virtuozzo.atlassian.net/browse/VSTOR-150731
>
> test_xsk.sh makes its veth pair in the host's namespace. The host's own
> traffic on the pair reaches the AF_XDP sockets under test, so the tests
> fail on a configured host and pass on a bare one. The series moves the
> veth part into a namespace of its own, after two fixes it relies on:
>
> - Patch 1: test_exit() exits 1 for a skip, so the runner counts every
> "skip all tests" as a failure.
> - Patch 2: xskxceiver takes the fragment limit from the max_skb_frags
> sysctl, which AF_XDP does not check and which exists in the initial
> namespace only. Take MAX_SKB_FRAGS from the kernel's BTF.
> - Patch 3: the namespace itself.
>
> Assisted-by: LLM
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
> ---
> Changes in v4:
> - Split v3 into three patches. The test_exit() fix gets a Fixes: tag;
> mainline gets the same fix (VSTOR-151679), and a commit of its own
> here can later be replaced by the ms/ one.
> - Patch 3: drop "mount --make-rprivate /", unshare --mount already
> makes the new mount namespace private.
> - Messages: the sysctl fallback serves kernels without BTF only, it
> cannot work inside the namespace; the "as before" claim is gone.
> - Link to v3: http://lore.virtuozzo.com/20261026012309.458048-1-eva.kurchatova@virtuozzo.com
>
> Changes in v3:
> - The namespace is unnamed, so it goes with its last process however
> the run ends, Ctrl-C, a timeout or a kill, and no outer run is left
> to delete host interfaces.
> - Obtain max_skb_frags from the kernel BTF, removing -f option.
> - Fix test_exit() exit status for skipped runs.
> - With -d, the namespace is kept.
> - Rebased.
> - Link to v2: http://lore.virtuozzo.com/kernel/20261022024816.2435565-1-eva.kurchatova@virtuozzo.com/T/#t
>
> Changes in v2:
> - -f is checked as the sysctl is, 1 to 45 and digits only, so a value
> that would wrap the fragment count or the packet array is refused.
> - -f goes into the namespace only when the host's sysctl file could be
> read; a bare -f made getopts complain.
> - No network namespace skips the tests, as no veth support does, rather
> than failing them.
> - The -f description says the option tells the tests the kernel's limit
> and changes nothing in the kernel.
> - The -d hint names the namespace in a usable form.
> - test_exit() exits 1 for a skip as it does for the veth one; as the
> script has it.
> - Link to v1: http://lore.virtuozzo.com/kernel/20261020041218.1659392-1-eva.kurchatova@virtuozzo.com/T/#t
>
> ---
> Eva Kurchatova (3):
> selftests/bpf: xsk: exit with the status test_exit() is given
> selftests/bpf: xsk: take the fragment limit from the kernel's BTF
> selftests/bpf: run the xsk veth tests in a network namespace of their own
>
> tools/testing/selftests/bpf/test_xsk.sh | 30 +++++++++++++++++++++--
> tools/testing/selftests/bpf/xsk_prereqs.sh | 2 +-
> tools/testing/selftests/bpf/xskxceiver.c | 39 +++++++++++++++++++++++++++++-
> 3 files changed, 67 insertions(+), 4 deletions(-)
> ---
> base-commit: 02401c5e378f282fbf11bdc65996253ff65dad9b
> change-id: 20261027-b4-prep-khorenko-vstor-150731-xsk-veth-netns-d97e81caa801
>
> Best regards,
> --
> Konstantin Khorenko,
> Virtuozzo Linux Kernel Team
Thanks, I've had a look. This is a clean split of my v3 series into 3
commits, with some wording tightened. The dropped `mount --make-rprivate
/` is correct, as `unshare --mount` already makes the new mount
namespace private.
This is good to merge.
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-27 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 18:15 Konstantin Khorenko
2026-10-27 18:15 ` [Devel] [PATCH hci-8.1 v4 1/3] selftests/bpf: xsk: exit with the status test_exit() is given Konstantin Khorenko
2026-10-27 18:15 ` [Devel] [PATCH hci-8.1 v4 2/3] selftests/bpf: xsk: take the fragment limit from the kernel's BTF Konstantin Khorenko
2026-10-27 18:15 ` [Devel] [PATCH hci-8.1 v4 3/3] selftests/bpf: run the xsk veth tests in a network namespace of their own Konstantin Khorenko
2026-10-27 18:50 ` Eva Kurchatova (Virtuozzo) [this message]
2026-10-29 13:59 ` [Devel] [PATCH hci-8.1 v4 0/3] " Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e89e31c-4676-486e-83ac-2f979199414f@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.