selftests/bpf: drop xdping tool
Subsystems (6)
v2 cover selftests/bpf: drop xdping tool
Hello,
this is the v2 of the small series dropping xdping tool. This removal is part of the larger effort aiming to tidy the bpf selftests directory. This new revision updates btf_dump test to make it use another bpf program rather than xdping_kern so that we can drop it as well.
---
Changes in v2:
- make btf_dump use xdp_dummy rather than xdping_kern
- and so, drop xdping_kern at the same time as the xdping tool
- collect Alan's RB
- Link to v1: https://patch.msgid.link/[email protected]
To: Alexei Starovoitov <[email protected]>
To: Daniel Borkmann <[email protected]>
To: Andrii Nakryiko <[email protected]>
To: Martin KaFai Lau <[email protected]>
To: Eduard Zingerman <[email protected]>
To: Kumar Kartikeya Dwivedi <[email protected]>
To: Song Liu <[email protected]>
To: Yonghong Song <[email protected]>
To: Jiri Olsa <[email protected]>
To: Shuah Khan <[email protected]>
To: "David S. Miller" <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Jesper Dangaard Brouer <[email protected]>
To: John Fastabend <[email protected]>
To: Stanislav Fomichev <[email protected]>
Cc: [email protected]
Cc: Bastien Curutchet <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Alexis Lothoré (eBPF Foundation) (2):
selftests/bpf: make btf_dump use xdp_dummy rather than xdping_kern selftests/bpf: drop xdping tool
tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 3 - tools/testing/selftests/bpf/prog_tests/btf_dump.c | 4 +- tools/testing/selftests/bpf/progs/xdping_kern.c | 183 ---------------- tools/testing/selftests/bpf/test_xdping.sh | 103 --------- tools/testing/selftests/bpf/xdping.c | 254 ---------------------- tools/testing/selftests/bpf/xdping.h | 13 -- 7 files changed, 2 insertions(+), 559 deletions(-)
---
base-commit: b7fb68124aa80db90394236a9a4a6add12f4425d
change-id: 20260417-xdping-5c2ef5a63899
Best regards,
Signature · 1 line
Alexis Lothoré (eBPF Foundation) <[email protected]>
PATCH v2 1/2 selftests/bpf: make btf_dump use xdp_dummy rather than xdping_kern
In order to prepare xdping tool removal from the BPF selftests directory, make the btf_dump test use another BPF program for the btf datasec dump test. Use xdp_dummy.bpf.o, as it is already used by various other tests.
--- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/prog_tests/btf_dump.c +2 -2
@@ -1027,8 +1027,8 @@ static void test_btf_dump_datasec_data(char *str)char license[4 ] ="GPL" ;struct btf_dump *d; - btf =btf__parse ("xdping_kern.bpf.o" ,NULL ); -if (!ASSERT_OK_PTR (btf,"xdping_kern.bpf.o BTF not found" )) + btf =btf__parse ("xdp_dummy.bpf.o" ,NULL ); +if (!ASSERT_OK_PTR (btf,"xdp_dummy.bpf.o BTF not found" ))return ; d =btf_dump__new (btf, btf_dump_snprintf, str,NULL );
Signature · 1 line
2.53.0
Re: [PATCH bpf-next v2 1/2] selftests/bpf: make btf_dump use xdp_dummy rather than xdping_kern
Quoted 6 lines · Alexis Lothoré (eBPF Foundation)
In order to prepare xdping tool removal from the BPF selftests directory, make the
btf_dumptest use another BPF program for the btf datasec dump test. Use xdp_dummy.bpf.o, as it is already used by various other tests.Signed-off-by Alexis Lothoré (eBPF Foundation) <[email protected]>
Quoted 24 lines
--- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/bpf/prog_tests/btf_dump.c +2
-2@@ -1027,8 +1027,8 @@ static void test_btf_dump_datasec_data(char *str)char license[4 ] ="GPL" ;struct btf_dump *d; - btf =btf__parse ("xdping_kern.bpf.o" ,NULL ); -if (!ASSERT_OK_PTR (btf,"xdping_kern.bpf.o BTF not found" )) + btf =btf__parse ("xdp_dummy.bpf.o" ,NULL ); +if (!ASSERT_OK_PTR (btf,"xdp_dummy.bpf.o BTF not found" ))return ; d =btf_dump__new (btf, btf_dump_snprintf, str,NULL );Signature · 2 lines
-- 2.53.0
PATCH v2 2/2 selftests/bpf: drop xdping tool
In reply to Alexis Lothoré (eBPF Foundation)As part of a larger cleanup effort in the bpf selftests directory, tests and scripts are either being converted to the test_progs framework (so they are executed automatically in bpf CI), or removed if not relevant for such integration.
The test_xdping.sh script (with the associated xdping.c) acts as a RTT measurement tool, by attaching two small xdp programs to two interfaces. Converting this test to test_progs may not make much sense:
- RTT measurement does not really fit in the scope of a functional test, this is rather about measuring some performance level.
- there are other existing tests in test_progs that actively validate XDP features like program attachment, return value processing, packet modification, etc
Drop test_xdping.sh, the corresponding xdping.c userspace part, the xdping_kern.c program, and the shared header, xdping.h
--- tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 3 - tools/testing/selftests/bpf/progs/xdping_kern.c | 183 ----------------- tools/testing/selftests/bpf/test_xdping.sh | 103 ---------- tools/testing/selftests/bpf/xdping.c | 254 ------------------------ tools/testing/selftests/bpf/xdping.h | 13 -- 6 files changed, 557 deletions(-)
tools/testing/selftests/bpf/.gitignore +0 -1
@@ -21,7 +21,6 @@ test_lirc_mode2_user flow_dissector_load test_tcpnotify_user test_libbpf -xdping test_cpp *.d *.subskel.h
tools/testing/selftests/bpf/Makefile +0 -3
@@ -111,7 +111,6 @@ TEST_FILES = xsk_prereqs.sh $(wildcard progs/btf_dump_test_case_*.c) # Order correspond to 'make run_tests' order TEST_PROGS := test_kmod.sh \ test_lirc_mode2.sh \ - test_xdping.sh \ test_bpftool_build.sh \ test_doc_build.sh \ test_xsk.sh \
@@ -134,7 +133,6 @@ TEST_GEN_PROGS_EXTENDED = \ xdp_features \ xdp_hw_metadata \ xdp_synproxy \ - xdping \ xskxceiver TEST_GEN_FILES += $(TEST_KMODS) liburandom_read.so urandom_read sign-file uprobe_multi
@@ -320,7 +318,6 @@ $(OUTPUT)/test_tcpnotify_user: $(CGROUP_HELPERS) $(TESTING_HELPERS) $(TRACE_HELP $(OUTPUT)/test_sock_fields: $(CGROUP_HELPERS) $(TESTING_HELPERS) $(OUTPUT)/test_tag: $(TESTING_HELPERS) $(OUTPUT)/test_lirc_mode2_user: $(TESTING_HELPERS) -$(OUTPUT)/xdping: $(TESTING_HELPERS) $(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS) $(OUTPUT)/test_maps: $(TESTING_HELPERS) $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS)
tools/testing/selftests/bpf/progs/xdping_kern.c deleted +0 -183
183 lines not on this page · raw message
tools/testing/selftests/bpf/test_xdping.sh deleted +0 -103
103 lines not on this page · raw message
tools/testing/selftests/bpf/xdping.c deleted +0 -254
254 lines not on this page · raw message
tools/testing/selftests/bpf/xdping.h deleted +0 -13
@@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. */ - -#define XDPING_MAX_COUNT 10 -#define XDPING_DEFAULT_COUNT 4 - -struct pinginfo { -__u64 start; -__be16 seq; -__u16 count; -__u32 pad; -__u64 times[XDPING_MAX_COUNT ]; -};
Signature · 1 line
2.53.0
Quoted 14 lines · Alexis Lothoré (eBPF Foundation)
As part of a larger cleanup effort in the bpf selftests directory, tests and scripts are either being converted to the
test_progsframework (so they are executed automatically in bpf CI), or removed if not relevant for such integration.The
test_xdping.shscript (with the associatedxdping.c) acts as a RTT measurement tool, by attaching two small xdp programs to two interfaces. Converting this test totest_progsmay not make much sense:
- RTT measurement does not really fit in the scope of a functional test, this is rather about measuring some performance level.
- there are other existing tests intest_progsthat actively validate XDP features like program attachment, return value processing, packet modification, etc
Quoted 5 lines
Drop
test_xdping.sh, the correspondingxdping.cuserspace part, thexdping_kern.cprogram, and the shared header,xdping.hSigned-off-by Alexis Lothoré (eBPF Foundation) <[email protected]>Reviewed-by Alan Maguire <[email protected]>
Quoted 9 lines
--- tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 3 - tools/testing/selftests/bpf/progs/xdping_kern.c | 183 ----------------- tools/testing/selftests/bpf/test_xdping.sh | 103 ---------- tools/testing/selftests/bpf/xdping.c | 254 ------------------------ tools/testing/selftests/bpf/xdping.h | 13 -- 6 files changed, 557 deletions(-)
[...]
This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Hello:
This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Quoted 8 lines · On Wed, 22 Apr 2026 18:20:23 +0200 you wrote:
Hello,
this is the v2 of the small series dropping xdping tool. This removal is part of the larger effort aiming to tidy the bpf selftests directory. This new revision updates
btf_dumptest to make it use another bpf program rather thanxdping_kernso that we can drop it as well.[...]
Here is the summary with links:
- [bpf-next,v2,1/2] selftests/bpf: make btf_dump use xdp_dummy rather than xdping_kern
https://git.kernel.org/bpf/bpf-next/c/d4a2eeb2ac78 - [bpf-next,v2,2/2] selftests/bpf: drop xdping tool https://git.kernel.org/bpf/bpf-next/c/feb13b19f3fa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html