From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: netdev@vger.kernel.org
Cc: magnus.karlsson@intel.com, stfomichev@gmail.com, kuba@kernel.org,
pabeni@redhat.com, tushar.vyavahare@intel.com,
kerneljasonxing@gmail.com, bjorn@kernel.org,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: [PATCH net-next 0/4] selftests: move the AF_XDP test suite from bpf to net
Date: Thu, 5 Nov 2026 14:41:13 +0100 [thread overview]
Message-ID: <20261105134117.977655-1-maciej.fijalkowski@intel.com> (raw)
Hi,
As the maintainers asked, this series is the first step of moving the
AF_XDP selftests from selftests/bpf to selftests/net: the code moves and
builds from its new location, without changing what the tests do. The
rework [0] posted as "selftests: net: migrate AF_XDP test suite over to
net" (v4) will follow on top of this move.
Patch 1 drops the test_progs wrapper of the AF_XDP tests, patch 2 adds a
generic BPF skeleton rule to net/bpf.mk, patch 3 moves xskxceiver, its
library and test_xsk.sh to selftests/net, and patch 4 (new, not covered
at [0]) moves xdp_hw_metadata, which is built from the same library.
The xdp_metadata test stays in test_progs: it covers BPF core
behaviour, and moving it would mean rewriting it for the kselftest
harness. It keeps using xsk.c from net/lib/xsk.
xskxceiver and xdp_hw_metadata are the first users of bpftool at build
time in selftests/net. NIPA has bpftool, but 0-day and KernelCI build
net without it, so both tools are skipped with a warning when bpftool
is missing or does not run.
test_xsk.sh is installed but not run by run_tests, so NIPA does not pick
it up: it runs every case, including flaky ones, and some cases leak
page_pool pages after skb_pp_cow_data() in generic XDP mode on
veth-based runs. Until a later step makes the suite fit for NIPA, no CI
runs the AF_XDP tests. test_xsk.sh is being removed by [0] but it is
kept here as there is no other feasible way to run the test suite (if
needed) until we come up with an upstreamable Python runner.
Thanks,
Maciej
[0]: https://lore.kernel.org/bpf/20261016174338.787135-1-maciej.fijalkowski@intel.com/
Maciej Fijalkowski (4):
selftests/bpf: drop the test_progs AF_XDP wrapper
selftests: net: add a generic rule for BPF skeletons
selftests: xsk: move the AF_XDP test suite to selftests/net
selftests: net: move xdp_hw_metadata from selftests/bpf
Documentation/networking/af_xdp.rst | 6 +-
Documentation/networking/xsk-tx-metadata.rst | 2 +-
MAINTAINERS | 4 +-
tools/testing/selftests/bpf/.gitignore | 2 -
tools/testing/selftests/bpf/Makefile | 29 +--
.../testing/selftests/bpf/Makefile.buildvars | 6 +-
tools/testing/selftests/bpf/network_helpers.c | 48 -----
tools/testing/selftests/bpf/network_helpers.h | 2 -
tools/testing/selftests/bpf/prog_tests/xsk.c | 170 ------------------
tools/testing/selftests/net/.gitignore | 2 +
tools/testing/selftests/net/Makefile | 20 +++
tools/testing/selftests/net/bpf.mk | 13 +-
tools/testing/selftests/net/config | 1 +
tools/testing/selftests/net/lib/.gitignore | 2 +
tools/testing/selftests/net/lib/Makefile | 25 +++
.../prog_tests => net/lib/xsk}/test_xsk.c | 2 +-
.../prog_tests => net/lib/xsk}/test_xsk.h | 5 +-
.../selftests/{bpf => net/lib/xsk}/xsk.c | 49 ++++-
.../selftests/{bpf => net/lib/xsk}/xsk.h | 4 +
.../{bpf => net/lib/xsk}/xsk_xdp_common.h | 0
.../lib/xsk/xsk_xdp_progs.bpf.c} | 2 +-
.../{bpf => net/lib/xsk}/xskxceiver.c | 17 +-
.../{bpf => net/lib/xsk}/xskxceiver.h | 0
.../selftests/{bpf => net}/test_xsk.sh | 5 +
.../xdp_hw_metadata.bpf.c} | 35 +++-
.../selftests/{bpf => net}/xdp_hw_metadata.c | 81 ++++++++-
tools/testing/selftests/net/xdp_metadata.h | 67 +++++++
.../selftests/{bpf => net}/xsk_prereqs.sh | 2 +-
28 files changed, 307 insertions(+), 294 deletions(-)
delete mode 100644 tools/testing/selftests/bpf/prog_tests/xsk.c
rename tools/testing/selftests/{bpf/prog_tests => net/lib/xsk}/test_xsk.c (99%)
rename tools/testing/selftests/{bpf/prog_tests => net/lib/xsk}/test_xsk.h (99%)
rename tools/testing/selftests/{bpf => net/lib/xsk}/xsk.c (95%)
rename tools/testing/selftests/{bpf => net/lib/xsk}/xsk.h (97%)
rename tools/testing/selftests/{bpf => net/lib/xsk}/xsk_xdp_common.h (100%)
rename tools/testing/selftests/{bpf/progs/xsk_xdp_progs.c => net/lib/xsk/xsk_xdp_progs.bpf.c} (98%)
rename tools/testing/selftests/{bpf => net/lib/xsk}/xskxceiver.c (96%)
rename tools/testing/selftests/{bpf => net/lib/xsk}/xskxceiver.h (100%)
rename tools/testing/selftests/{bpf => net}/test_xsk.sh (98%)
rename tools/testing/selftests/{bpf/progs/xdp_hw_metadata.c => net/xdp_hw_metadata.bpf.c} (75%)
rename tools/testing/selftests/{bpf => net}/xdp_hw_metadata.c (92%)
create mode 100644 tools/testing/selftests/net/xdp_metadata.h
rename tools/testing/selftests/{bpf => net}/xsk_prereqs.sh (98%)
base-commit: 7b6ab4dbc156e2f96419715130b3d5738a306c93
--
2.43.0
next reply other threads:[~2026-11-05 13:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 13:41 Maciej Fijalkowski [this message]
2026-11-05 13:41 ` [PATCH net-next 1/4] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-11-05 13:41 ` [PATCH net-next 2/4] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-11-05 13:41 ` [PATCH net-next 3/4] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-11-05 13:41 ` [PATCH net-next 4/4] selftests: net: move xdp_hw_metadata from selftests/bpf Maciej Fijalkowski
2026-11-05 20:43 ` [PATCH net-next 0/4] selftests: move the AF_XDP test suite from bpf to net Stanislav Fomichev
2026-11-09 12:44 ` Maciej Fijalkowski
2026-11-09 16:52 ` Stanislav Fomichev
2026-11-09 19:12 ` Maciej Fijalkowski
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=20261105134117.977655-1-maciej.fijalkowski@intel.com \
--to=maciej.fijalkowski@intel.com \
--cc=bjorn@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stfomichev@gmail.com \
--cc=tushar.vyavahare@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox