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 06/15] selftests: xsk: move the AF_XDP test suite to selftests/net
Date: Sat, 17 Oct 2026 17:31:41 +0200 [thread overview]
Message-ID: <atOU3fhtxfef6eCl@boxer> (raw)
In-Reply-To: <179220636618.434549.11404278084536397224@kernel.org>
On Sat, Oct 17, 2026 at 03:06:06AM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>
> 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] Undisclosed relicensing.
> - [Low] In tools/testing/selftests/net/lib/Makefile, the xskxceiver
> binary is only removed by `make clean` when bpftool happens to work at…
>
> --
>
> selftests: xsk: move the AF_XDP test suite to selftests/net
>
> This commit moves the xskxceiver engine, the xsk userspace library, the
> test definitions and the XDP program from selftests/bpf to
> selftests/net/lib/xsk. It also moves test_xsk.sh and xsk_prereqs.sh to
> selftests/net, and net/lib now builds xskxceiver only when a working
> bpftool is found. The two ethtool ring helpers move from
> bpf/network_helpers.c into xsk.c.
>
> > diff --git a/tools/testing/selftests/net/lib/Makefile b/tools/testing/selftests/net/lib/Makefile
> > index ff83603397d06..c26088da04892 100644
> > --- a/tools/testing/selftests/net/lib/Makefile
> > +++ b/tools/testing/selftests/net/lib/Makefile
> > @@ -5,6 +5,15 @@ CFLAGS += -I../../../../../usr/include/ $(KHDR_INCLUDES)
> > # Additional include paths needed by kselftest.h
> > CFLAGS += -I../../
> >
> > +# xskxceiver needs a working bpftool to generate its skeleton
> > +BPFTOOL ?= bpftool
> > +HAS_BPFTOOL := $(shell $(BPFTOOL) version >/dev/null 2>&1 && echo y)
> > +ifeq ($(HAS_BPFTOOL),y)
> > +COND_GEN_FILES += xskxceiver
> > +else
> > +$(warning excluding xskxceiver, bpftool not installed or not working)
> > +endif
> > +
>
> [ ... ]
>
> > @@ -13,6 +22,7 @@ TEST_FILES := \
> >
> > TEST_GEN_FILES := \
> > $(patsubst %.c,%.o,$(wildcard *.bpf.c)) \
> > + $(COND_GEN_FILES) \
> > csum \
> > gro \
> > xdp_helper \
> > @@ -23,3 +33,28 @@ TEST_INCLUDES := $(wildcard py/*.py sh/*.sh)
>
> [ ... ]
>
> > +$(OUTPUT)/xskxceiver: $(XSK_SOURCES) $(XSK_HEADERS) $(XSK_SKEL) $(BPFOBJ)
> > + $(call msg,CC,,$@)
> > + $(Q)$(CC) -I$(top_srcdir)/tools/include $(CFLAGS) -I$(OUTPUT) \
> > + -I$(SCRATCH_DIR)/include \
> > + $(XSK_SOURCES) $(BPFOBJ) $(LDLIBS) $(XSK_LDLIBS) -o $@
> > +
> > +EXTRA_CLEAN += $(XSK_BPF_OBJ) $(XSK_SKEL)
>
> [Severity: Low]
> Will make clean leave lib/xskxceiver behind if bpftool can't be used
> when clean runs?
>
> HAS_BPFTOOL is evaluated when the Makefile is parsed. xskxceiver only
> ends up in TEST_GEN_FILES if "$(BPFTOOL) version" succeeds during that
> same make invocation.
>
> The clean target in lib.mk removes:
>
> $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
>
> Here EXTRA_CLEAN only lists the .bpf.o and the skeleton.
>
> Say the binary was built with a working bpftool, and make clean later
> runs where bpftool doesn't work. That can happen with a different PATH,
> a BPFTOOL= override, or a cross environment. The intermediates get
> removed, but $(OUTPUT)/xskxceiver stays.
>
> test_xsk.sh only checks:
>
> if [ ! -x "./${XSKOBJ}" ]; then
>
> So it would run the stale binary instead of skipping.
Stale binary is still a valid xskxceiver...test_xsk.sh is later gone so
this check is not something we should worry about.
However, adding it to EXTRA_CLEAN would not hurt, as a follow-up. Maybe we
should audit also other binaries (iou-zcrx) while at it.
>
> Would it work to add $(OUTPUT)/xskxceiver to EXTRA_CLEAN
> unconditionally? The same Makefile logic is still there at the end of
> the series.
>
> > diff --git a/tools/testing/selftests/bpf/xsk.c b/tools/testing/selftests/net/lib/xsk/xsk.c
> > similarity index 95%
> > rename from tools/testing/selftests/bpf/xsk.c
> > rename to tools/testing/selftests/net/lib/xsk/xsk.c
> > index 25d568abf0f20..6bd32caf5d085 100644
> > --- a/tools/testing/selftests/bpf/xsk.c
> > +++ b/tools/testing/selftests/net/lib/xsk/xsk.c
>
> [ ... ]
>
> > @@ -779,3 +778,51 @@ void xsk_socket__delete(struct xsk_socket *xsk)
> > close(xsk->fd);
> > free(xsk);
> > }
> > +
> > +int get_hw_ring_size(char *ifname, struct ethtool_ringparam *ring_param)
> > +{
>
> [Severity: Medium]
> Does this move change the licence of these helpers?
>
> get_hw_ring_size() and set_hw_ring_size() come from
> tools/testing/selftests/bpf/network_helpers.c, which has:
>
> // SPDX-License-Identifier: GPL-2.0-only
>
> xsk.c starts with:
>
> // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
>
> Tushar Vyavahare added both helpers in commits 90a695c3d31e1c and
> bee3a7b0762422 under GPL-2.0-only. After the move they are unchanged,
> but they now sit in a file that offers its contents under LGPL-2.1 or
> BSD-2-Clause, with no per-function licence note.
>
> The commit message only says "Move the two ethtool ring helpers from
> network_helpers into xsk.c". It doesn't mention the licence change, and
> there is no Ack from the original author. This is still true at the end
> of the series.
>
> Could the helpers go into one of the GPL-2.0 files in the same
> directory instead, such as test_xsk.c or xskxceiver.c? If they need to
> stay in xsk.c, could the relicensing be stated explicitly, with an Ack
> from the copyright holder?
libbpf was at latter dual license AFAIR, I did not pay much attention that
apparently network_helpers.c had it different.
If Tushar would insist as original author I could fixup licenses, but I
don't see it as a show-stopper.
>
> > + struct ifreq ifr = {0};
> > + int sockfd, err;
>
> [ ... ]
>
> > +int set_hw_ring_size(char *ifname, struct ethtool_ringparam *ring_param)
> > +{
>
> [ ... ]
>
> --
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261014184539.774708-1-maciej.fijalkowski%40intel.com
next prev parent reply other threads:[~2026-10-17 15:31 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
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 [this message]
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=atOU3fhtxfef6eCl@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 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.