Netdev List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<magnus.karlsson@intel.com>, <stfomichev@gmail.com>,
	<kuba@kernel.org>, <pabeni@redhat.com>,
	<tushar.vyavahare@intel.com>, <kerneljasonxing@gmail.com>
Subject: Re: [PATCH v2 net-next 05/14] selftests: xsk: move the AF_XDP test suite to selftests/net
Date: Fri, 9 Oct 2026 14:46:02 +0200	[thread overview]
Message-ID: <asjiChSGMlD5Xo/I@boxer> (raw)
In-Reply-To: <87qzhzqg0d.fsf@all.your.base.are.belong.to.us>

On Fri, Oct 09, 2026 at 01:18:10PM +0200, Björn Töpel wrote:
> Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:
> 
> > Move the xskxceiver engine, the AF_XDP userspace library, the test
> > definitions and the XDP program to net/lib/xsk, and the veth launcher
> > test_xsk.sh with its prerequisites script to selftests/net. A later
> > patch drives the same engine against real NICs from drivers/net/hw, and
> > net/lib is where both suites already take shared helpers from, so the
> > binary does not need a second copy.
> >
> > net/lib builds xskxceiver together with its XDP program and skeleton,
> > using the bpftool in PATH, and skips it with a warning when bpftool is
> > missing or does not run, so the rest of net/lib still builds.
> > selftests/net installs test_xsk.sh, which runs lib/xskxceiver.
> >
> > Like the rest of net/lib, xskxceiver builds against the installed uapi
> > headers rather than the tools/include/uapi copies that the bpf selftests
> > use. xskxceiver.c got min_t() only because the tools copy of
> > linux/netlink.h includes linux/kernel.h, so include linux/kernel.h
> > directly.
> >
> > Move the two ethtool ring helpers from network_helpers into xsk.c so the
> > engine no longer depends on network_helpers, and point the kselftest.h
> > include of test_xsk.h at the net/lib include path. The XDP program moves
> > unchanged. Its Ethernet header bound check compares pointers of distinct
> > types, so net/lib builds it with -Wno-compare-distinct-pointer-types, as
> > the bpf selftests do.
> >
> > xdp_hw_metadata and the test_progs xdp_metadata test keep using xsk.c
> > and xsk.h from their new location.
> >
> > Point the AF_XDP entry in MAINTAINERS at the new paths.
> >
> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> > ---
> >  Documentation/networking/af_xdp.rst           |  6 +--
> >  MAINTAINERS                                   |  3 +-
> >  tools/testing/selftests/bpf/.gitignore        |  1 -
> >  tools/testing/selftests/bpf/Makefile          | 29 +++++------
> >  tools/testing/selftests/bpf/network_helpers.c | 48 ------------------
> >  tools/testing/selftests/bpf/network_helpers.h |  2 -
> >  tools/testing/selftests/net/Makefile          |  2 +
> >  tools/testing/selftests/net/config            |  1 +
> >  tools/testing/selftests/net/lib/.gitignore    |  2 +
> >  tools/testing/selftests/net/lib/Makefile      | 34 +++++++++++++
> >  .../prog_tests => net/lib/xsk}/test_xsk.c     |  2 +-
> >  .../prog_tests => net/lib/xsk}/test_xsk.h     |  2 +-
> >  .../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}              |  0
> >  .../{bpf => net/lib/xsk}/xskxceiver.c         |  7 +--
> >  .../{bpf => net/lib/xsk}/xskxceiver.h         |  0
> >  .../selftests/{bpf => net}/test_xsk.sh        |  0
> 
> I would not carry the test_xsk.sh over. Just do a Python variant, like
> the drivers/net/hw/xsk.py, but for net instead. Look at the the
> nk_lease.py pair for inspiration.
> 
> It's just a cogitive load switch between Python and bash. We're starting
> out fresh(ish) here.
> 
> The Python ksft world gives us a lot for free.

Plan was to move fast as you wanted + watch the code churn not to blow
off. I assume now it's better to take some time and do things right from
the start.

> 
> 
> Björn

  reply	other threads:[~2026-10-09 12:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 11:48 [PATCH v2 net-next 00/14] selftests: net: migrate AF_XDP test suite over to net Maciej Fijalkowski
2026-10-08 11:48 ` [PATCH v2 net-next 01/14] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-10-08 11:48 ` [PATCH v2 net-next 02/14] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-10-09  9:46   ` Björn Töpel
2026-10-09 12:43     ` Maciej Fijalkowski
2026-10-08 11:48 ` [PATCH v2 net-next 03/14] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-10-08 11:48 ` [PATCH v2 net-next 04/14] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 05/14] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-10-09 11:18   ` Björn Töpel
2026-10-09 12:46     ` Maciej Fijalkowski [this message]
2026-10-08 11:49 ` [PATCH v2 net-next 06/14] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 07/14] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 08/14] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-10-09 11:25   ` Björn Töpel
2026-10-08 11:49 ` [PATCH v2 net-next 09/14] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 10/14] selftests: xsk: add a hardware mode to xskxceiver Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 11/14] selftests: xsk: pass non-test traffic to the stack in hardware mode Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 12/14] selftests: xsk: share test case definitions with hardware runner Maciej Fijalkowski
2026-10-09 12:12   ` Björn Töpel
2026-10-09 12:52     ` Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 13/14] selftests: drv-net: test AF_XDP zero-copy with an SKB peer Maciej Fijalkowski
2026-10-08 21:37   ` Jakub Kicinski
2026-10-09 13:13     ` Maciej Fijalkowski
2026-10-08 11:49 ` [PATCH v2 net-next 14/14] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
2026-10-08 21:41   ` Jakub Kicinski
2026-10-08 21:30 ` [PATCH v2 net-next 00/14] selftests: net: migrate AF_XDP test suite over to net Jakub Kicinski
2026-10-09 12:02   ` Björn Töpel
2026-10-09 13:15     ` 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=asjiChSGMlD5Xo/I@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.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