BPF List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: <netdev-bot+sashiko@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>,
	<bjorn@kernel.org>
Subject: Re: [PATCH v3 net-next 03/15] selftests: xsk: drop the single-interface loopback mode
Date: Sat, 17 Oct 2026 16:50:49 +0200	[thread overview]
Message-ID: <atOLSbHkCUhVnBZ4@boxer> (raw)
In-Reply-To: <179220636510.434549.7705519903366245411@kernel.org>

On Sat, Oct 17, 2026 at 03:06:05AM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
> 
> Critical: 0 · High: 0 · Medium: 1 · Low: 0
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
> 
> - [Medium] Old single-interface invocations are now misread instead of
>   being rejected.
> 
> --
> 
> selftests: xsk: drop the single-interface loopback mode
> 
> This commit removes the xskxceiver mode where the TX and RX sockets were
> bound to queue 0 of one interface with a shared UMEM. It also removes the
> split UMEM addressing and the POLL_TXQ_FULL workaround that mode needed.
> The -i IFACE option of test_xsk.sh is dropped as well.
> 
> > diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh
> > index 62db060298a4a..69fac65f073c5 100755
> > --- a/tools/testing/selftests/bpf/test_xsk.sh
> > +++ b/tools/testing/selftests/bpf/test_xsk.sh
> 
> [ ... ]
> 
> > @@ -88,14 +85,11 @@
> >  
> >  . xsk_prereqs.sh
> >  
> > -ETH=""
> > -
> > -while getopts "vi:dm:lt:h" flag
> > +while getopts "vdm:lt:h" flag
> >  do
> >  	case "${flag}" in
> >  		v) verbose=1;;
> >  		d) debug=1;;
> > -		i) ETH=${OPTARG};;
> >  		m) MODE=${OPTARG};;
> >  		l) list=1;;
> >  		t) TEST=${OPTARG};;
> 
> [ ... ]
> 
> > diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c
> > index 7dad8556a722e..24109dd7264e2 100644
> > --- a/tools/testing/selftests/bpf/xskxceiver.c
> > +++ b/tools/testing/selftests/bpf/xskxceiver.c
> 
> [ ... ]
> 
> > @@ -388,10 +387,6 @@ int main(int argc, char **argv)
> >  		ksft_exit_xfail();
> >  	}
> >  
> > -	shared_netdev = (ifobj_tx->ifindex == ifobj_rx->ifindex);
> > -	ifobj_tx->shared_umem = shared_netdev;
> > -	ifobj_rx->shared_umem = shared_netdev;
> > -
> >  	if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx))
> >  		print_usage(argv);
> 
> [Severity: Medium]
> Now that shared_netdev is gone, what rejects the old
> "xskxceiver -i ethX -i ethX" invocation?
> 
> parse_command_line() still sets ifobj_tx and ifobj_rx from the first two
> -i options. validate_interface() only rejects an empty name. As a result,
> TX and RX can use the same ifindex and nothing reports it.
> 
> When that happens, each endpoint binds its own UMEM to queue 0 of the same
> netdev, because xsk_configure() now does:
> 
> 	bool shared = !!i;
> 
> The TX bind cannot succeed without XDP_SHARED_UMEM. xsk_configure()
> retries SOCK_RECONF_CTR times, and then every test fails. Nothing tells
> the user that the mode was removed.
> 
> xsk_attach_xdp_progs() has also lost its early return for a shared-netdev
> TX side, so the TX attach replaces the RX program on the same ifindex.
> 
> Should main() exit with a usage error when
> ifobj_tx->ifindex == ifobj_rx->ifindex?
> 
> test_xsk.sh has a related problem. 'i' is no longer in the getopts string,
> and the case statement has no '?' arm. Running "test_xsk.sh -i ethX"
> prints an illegal option warning and then runs the veth suite, which could
> be mistaken for a hardware result.
> 
> Later patches in this series look like they resolve this:
> 
> - "selftests: xsk: run one test case per xskxceiver invocation" removes
>   test_xsk.sh and xsk_prereqs.sh in favour of test_xsk.py.
> 
> - "selftests: xsk: run the RX and TX endpoints in separate processes"
>   makes parse_command_line() take a single interface. It calls
>   print_usage() when the role, peer host, peer port, test or mode is
>   missing.
> 
> So the problem seems limited to this commit, for example while bisecting.

These are correct statements, however I wouldn't expect us to be hunting
down the bugs while bisecting onto this particular commit as it is putting
the tool into transitional state and as it is said above, future commits
take care of this.

Let me see if I will be so clever with providing justifications onto
further reports on this series ;)

> 
> -- 
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261014184539.774708-1-maciej.fijalkowski%40intel.com

  reply	other threads:[~2026-10-17 14:51 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 18:45 [PATCH v3 net-next 00/15] selftests: net: migrate AF_XDP test suite over to net Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 01/15] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-10-15  8:14   ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 02/15] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-10-15  8:15   ` Björn Töpel
2026-10-15 18:46   ` sashiko-bot
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 14:40     ` Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 03/15] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-10-15  8:17   ` Björn Töpel
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 14:50     ` Maciej Fijalkowski [this message]
2026-10-14 18:45 ` [PATCH v3 net-next 04/15] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-10-15  8:18   ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 05/15] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-10-15  8:20   ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 06/15] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-10-15  8:22   ` Björn Töpel
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 15:31     ` Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 07/15] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-10-15  8:27   ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 08/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-10-15  8:29   ` Björn Töpel
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-14 18:45 ` [PATCH v3 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-10-15  8:34   ` Björn Töpel
2026-10-15 18:46   ` sashiko-bot
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 16:04     ` Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 10/15] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-10-15  9:04   ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 11/15] selftests: xsk: add a hardware mode to xskxceiver Maciej Fijalkowski
2026-10-15  9:42   ` Björn Töpel
2026-10-15 10:55     ` Maciej Fijalkowski
2026-10-15 16:03       ` Björn Töpel
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 17:40     ` Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 12/15] selftests: xsk: pass non-test traffic to the stack in hardware mode Maciej Fijalkowski
2026-10-15 10:05   ` Björn Töpel
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-14 18:45 ` [PATCH v3 net-next 13/15] selftests: xsk: list the hardware test cases Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 14/15] selftests: drv-net: test AF_XDP zero-copy with an SKB peer Maciej Fijalkowski
2026-10-15 10:29   ` Björn Töpel
2026-10-15 12:52     ` Maciej Fijalkowski
2026-10-15 18:46   ` sashiko-bot
2026-10-17  3:06   ` netdev-bot+sashiko
2026-10-17 18:50     ` Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 15/15] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
2026-10-17  3:06   ` netdev-bot+sashiko

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=atOLSbHkCUhVnBZ4@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-bot+sashiko@kernel.org \
    --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