From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>, devel@openvz.org
Subject: [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 19:15:18 +0100 [thread overview]
Message-ID: <20261027-b4-prep-khorenko-vstor-150731-xsk-veth-netns-v4-0-c74cad570c70@virtuozzo.com> (raw)
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
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next reply other threads:[~2026-10-27 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 18:15 Konstantin Khorenko [this message]
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 ` [Devel] [PATCH hci-8.1 v4 0/3] " Eva Kurchatova (Virtuozzo)
2026-10-29 13:59 ` 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=20261027-b4-prep-khorenko-vstor-150731-xsk-veth-netns-v4-0-c74cad570c70@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
/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.