* [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects
@ 2026-07-28 11:50 Tushar Vyavahare
2026-08-01 0:28 ` Jakub Kicinski
2026-08-01 1:32 ` bot+bpf-ci
0 siblings, 2 replies; 3+ messages in thread
From: Tushar Vyavahare @ 2026-07-28 11:50 UTC (permalink / raw)
To: netdev, magnus.karlsson, maciej.fijalkowski, stfomichev,
kernelxing, davem, kuba, pabeni, ast, daniel, tirthendu.sarkar,
tushar.vyavahare, andrii.nakryiko
Cc: bpf
Build xskxceiver, xdp_hw_metadata, and xdp_features from explicit source
lists instead of reusing helper objects produced by test_progs rules.
Reusing shared objects such as network_helpers.o and xsk.o can pull in
test_progs-only dependency chains and trigger unrelated libarena builds
when invoking a single target.
Keep these standalone binaries self-contained so each target builds only
its own required sources and BPF skeleton dependencies.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
---
v3:
- Fix SoB line
- Add tags from Maciej
v2:
- Inline dependency lists in tools/testing/selftests/bpf/Makefile.
- Drop *_SRC helper variables per review feedback.
---
tools/testing/selftests/bpf/Makefile | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index b642ee489ea6..f4e78bf8ec80 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -934,17 +934,26 @@ $(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-# Include find_bit.c to compile xskxceiver.
-EXTRA_SRC := $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c prog_tests/test_xsk.h
-$(OUTPUT)/xskxceiver: $(EXTRA_SRC) xskxceiver.c xskxceiver.h $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
+# Keep xskxceiver independent from test_progs object dependencies.
+$(OUTPUT)/xskxceiver: xskxceiver.c xsk.c network_helpers.c \
+ $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c \
+ xskxceiver.h xsk.h network_helpers.h \
+ prog_tests/test_xsk.h test_progs.h bpf_util.h \
+ $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT)
+$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c xsk.c network_helpers.c \
+ $(TOOLSDIR)/lib/find_bit.c xdp_metadata.h \
+ xsk.h network_helpers.h test_progs.h bpf_util.h \
+ $(OUTPUT)/xdp_hw_metadata.skel.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-$(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp_features.skel.h | $(OUTPUT)
+$(OUTPUT)/xdp_features: xdp_features.c network_helpers.c xdp_features.h \
+ network_helpers.h \
+ test_progs.h bpf_util.h $(OUTPUT)/xdp_features.skel.h \
+ $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects
2026-07-28 11:50 [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects Tushar Vyavahare
@ 2026-08-01 0:28 ` Jakub Kicinski
2026-08-01 1:32 ` bot+bpf-ci
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-08-01 0:28 UTC (permalink / raw)
To: Tushar Vyavahare
Cc: netdev, magnus.karlsson, maciej.fijalkowski, stfomichev,
kernelxing, davem, pabeni, ast, daniel, tirthendu.sarkar,
andrii.nakryiko, bpf
On Tue, 28 Jul 2026 11:50:36 +0000 Tushar Vyavahare wrote:
> Subject: [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects
> tools/testing/selftests/bpf/Makefile | 19 ++++++++++++++-----
^^^^^^^^^^^^^
This needs to go via bpf tree, the Makefile is shared with real BPF
stuff so we better not cause conflicts. Reassigned in patchwork,
no need to repost.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects
2026-07-28 11:50 [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects Tushar Vyavahare
2026-08-01 0:28 ` Jakub Kicinski
@ 2026-08-01 1:32 ` bot+bpf-ci
1 sibling, 0 replies; 3+ messages in thread
From: bot+bpf-ci @ 2026-08-01 1:32 UTC (permalink / raw)
To: tushar.vyavahare, netdev, magnus.karlsson, maciej.fijalkowski,
stfomichev, kernelxing, davem, kuba, pabeni, ast, daniel,
tirthendu.sarkar, tushar.vyavahare, andrii.nakryiko
Cc: bpf, ast, andrii, daniel, martin.lau, eddyz87, yonghong.song, clm,
ihor.solodrai
[-- Attachment #1: Type: text/plain, Size: 3336 bytes --]
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 55d394438705..2749b26fd4cd 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -932,17 +932,26 @@ $(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
> $(call msg,BINARY,,$@)
> $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
>
> -# Include find_bit.c to compile xskxceiver.
> -EXTRA_SRC := $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c prog_tests/test_xsk.h
> -$(OUTPUT)/xskxceiver: $(EXTRA_SRC) xskxceiver.c xskxceiver.h $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
> +# Keep xskxceiver independent from test_progs object dependencies.
> +$(OUTPUT)/xskxceiver: xskxceiver.c xsk.c network_helpers.c \
> + $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c \
> + xskxceiver.h xsk.h network_helpers.h \
> + prog_tests/test_xsk.h test_progs.h bpf_util.h \
> + $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
> $(call msg,BINARY,,$@)
> $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
>
> -$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT)
> +$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c xsk.c network_helpers.c \
> + $(TOOLSDIR)/lib/find_bit.c xdp_metadata.h \
> + xsk.h network_helpers.h test_progs.h bpf_util.h \
> + $(OUTPUT)/xdp_hw_metadata.skel.h $(BPFOBJ) | $(OUTPUT)
> $(call msg,BINARY,,$@)
> $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
This isn't a bug, but does xdp_hw_metadata actually need
$(TOOLSDIR)/lib/find_bit.c? Nothing in xdp_hw_metadata.c, xsk.c or
network_helpers.c seems to pull in <linux/bitmap.h> or the find_*_bit
helpers, unlike prog_tests/test_xsk.c in the xskxceiver rule.
The xskxceiver rule genuinely needs find_bit.c because
prog_tests/test_xsk.c includes <linux/bitmap.h> and calls bitmap_full(),
bitmap_zero(), and __set_bit(). The pre-patch xdp_hw_metadata rule did not
list find_bit.c either. The only bit-field work in xdp_hw_metadata.c is
FIELD_GET on GENMASK constants, which doesn't require find_bit helpers.
>
> -$(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp_features.skel.h | $(OUTPUT)
> +$(OUTPUT)/xdp_features: xdp_features.c network_helpers.c xdp_features.h \
> + network_helpers.h \
> + test_progs.h bpf_util.h $(OUTPUT)/xdp_features.skel.h \
> + $(BPFOBJ) | $(OUTPUT)
> $(call msg,BINARY,,$@)
> $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
This isn't a bug, but could the xdp_features prerequisite list be packed
into two continuation lines to match the density of the xskxceiver and
xdp_hw_metadata rules just above? The current wrapping spreads the
prerequisites over four lines with one line carrying only network_helpers.h
and the final line carrying just $(BPFOBJ) | $(OUTPUT), while both rules
above group their prerequisites more densely at the same indentation.
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/30676354696
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-01 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 11:50 [PATCH net-next v3] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects Tushar Vyavahare
2026-08-01 0:28 ` Jakub Kicinski
2026-08-01 1:32 ` bot+bpf-ci
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.