BPF List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<magnus.karlsson@intel.com>, <stfomichev@gmail.com>,
	<pabeni@redhat.com>, <tushar.vyavahare@intel.com>,
	<kerneljasonxing@gmail.com>, <bjorn@kernel.org>
Subject: Re: [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation
Date: Thu, 22 Oct 2026 17:44:14 +0200	[thread overview]
Message-ID: <atovTlRGERDYjB4q@boxer> (raw)
In-Reply-To: <20261021150145.65a22a61@kernel.org>

On Wed, Oct 21, 2026 at 03:01:45PM -0700, Jakub Kicinski wrote:
> On Fri, 16 Oct 2026 19:43:32 +0200 Maciej Fijalkowski wrote:
> > Replace test_xsk.sh and xsk_prereqs.sh with test_xsk.py, which runs
> > xskxceiver once per mode and case, so that every case starts from a
> > fresh process and a crash fails only its own case. A single case is
> > also the unit that the next patch splits into RX and TX processes.
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 1fc9eaedd744..6985a42bc09c 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -29784,6 +29784,7 @@ F:	include/uapi/linux/if_xdp.h
> >  F:	include/uapi/linux/xdp_diag.h
> >  F:	net/xdp/
> >  F:	tools/testing/selftests/net/*xsk*
> > +F:	tools/testing/selftests/net/lib/py/xsk.py
> >  F:	tools/testing/selftests/net/lib/xsk/
> 
> pylint has some complaints, about main(), I think?
> Could you make it clean?
> 
> > +++ b/tools/testing/selftests/net/lib/py/xsk.py
> 
> Really not loving the amount of "library" code added here.
> Do you need this just to run it over veth in net/ and over
> real HW in drivers/net/ ? Are the test cases very different?

Now that you bring this up, would be good to clarify expectations of this
work. The lib input is what veth and hw runners share to avoid code
repetition. The separation comes from a fact that we still want to cover
SKB and DRV modes (via veth at net/test_xsk.py) and ZC mode is covered by
drivers/net/hw/xsk.py.

My assumption was that would not hurt much to carry common code within lib
file. I might have been wrong tho.

> 
> I wonder if we could solve this by parameterizing the env
> class to use veth instead of netdevsim and then have unified tests?

Tell me more regarding the unified tests. Is that okay'ish to run
veth-based tests from drivers/net/hw ? I thought it was not and I shared
my insights on similar work which does the same kind of migration
(xdp_features bpf->drivers/net/hw) and it seemed to be heavily veth
dedicated - the bpf sh runner was basically veth based, but so does the
xskxceiver and I moved away from this after Bjorn's input (turned out to
be a good thing).

each runner can have single ksft_run() call, right? So, do you think
separate files for veth and hw runners is still okay?

In veth runner I don't even instantiate NetDrvEpEnv as I have veth pair
being created 'manually', however having a param similar to existing
netdevsim one would be nice and xdp-features set could benefit from that
as well. 

> 
> 
> > +def xsk_wait_endpoint_exit(endpoint, label, timeout):
> 
> odd, the existing cmd() / bkg() stuff doesn't work for you?
> It works for many other tests...

This has been mostly about grabbing output from failed cases, let me dig
and see if bkg() is indeed enough or if we could adjust it. Good point!

> -- 
> pw-bot: cr

  reply	other threads:[~2026-10-22 15:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 17:43 [PATCH v4 net-next 00/15] selftests: net: migrate AF_XDP test suite over to net Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 01/15] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 02/15] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-10-17 17:44   ` sashiko-bot
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 03/15] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-10-17 17:44   ` sashiko-bot
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 04/15] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 05/15] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 06/15] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-21 21:55   ` Jakub Kicinski
2026-10-16 17:43 ` [PATCH v4 net-next 07/15] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 08/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-10-17 17:44   ` sashiko-bot
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-21 22:01   ` Jakub Kicinski
2026-10-22 15:44     ` Maciej Fijalkowski [this message]
2026-10-23  1:24       ` Jakub Kicinski
2026-10-16 17:43 ` [PATCH v4 net-next 10/15] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 11/15] selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs Maciej Fijalkowski
2026-10-17 17:44   ` sashiko-bot
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-21 11:30     ` Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 12/15] selftests: xsk: prepare xskxceiver for endpoints on two hosts Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 13/15] selftests: xsk: list the hardware test cases Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 14/15] selftests: drv-net: test AF_XDP zero-copy with an SKB peer Maciej Fijalkowski
2026-10-20 19:30   ` netdev-bot+sashiko
2026-10-16 17:43 ` [PATCH v4 net-next 15/15] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
2026-10-18 19:20 ` [PATCH v4 net-next 00/15] selftests: net: migrate AF_XDP test suite over to net Björn Töpel

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=atovTlRGERDYjB4q@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