public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] selftests: bpf: Migrate test_xdp_redirect.sh to test_progs
@ 2025-01-03 10:10 Bastien Curutchet (eBPF Foundation)
  2025-01-03 10:10 ` [PATCH 1/3] selftests/bpf: test_xdp_redirect: Rename BPF sections Bastien Curutchet (eBPF Foundation)
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Bastien Curutchet (eBPF Foundation) @ 2025-01-03 10:10 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
	Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Mykola Lysenko, Shuah Khan
  Cc: Thomas Petazzoni, Alexis Lothore, netdev, bpf, linux-kselftest,
	linux-kernel, Bastien Curutchet (eBPF Foundation)

Hi all,

This patch series continues the work to migrate the *.sh tests into
prog_tests.

test_xdp_redirect.sh tests the XDP redirections done through
bpf_redirect().

These XDP redirections are already tested by prog_tests/xdp_do_redirect.c
but IMO it doesn't cover the exact same code path because
xdp_do_redirect.c uses bpf_prog_test_run_opts() to trigger redirections
of 'fake packets' while test_xdp_redirect.sh redirects packets coming
from the network. Also, the test_xdp_redirect.sh script tests the
redirections with both SKB and DRV modes while xdp_do_redirect.c only
tests the DRV mode.

The patch series adds two new test cases in prog_tests/xdp_do_redirect.c
to replace the test_xdp_redirect.sh script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
---
Bastien Curutchet (eBPF Foundation) (3):
      selftests/bpf: test_xdp_redirect: Rename BPF sections
      selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c
      selftests/bpf: Migrate test_xdp_redirect.c to test_xdp_do_redirect.c

 tools/testing/selftests/bpf/Makefile               |   1 -
 .../selftests/bpf/prog_tests/xdp_do_redirect.c     | 192 +++++++++++++++++++++
 .../selftests/bpf/progs/test_xdp_do_redirect.c     |  12 ++
 .../selftests/bpf/progs/test_xdp_redirect.c        |  26 ---
 tools/testing/selftests/bpf/test_xdp_redirect.sh   |  79 ---------
 5 files changed, 204 insertions(+), 106 deletions(-)
---
base-commit: da86bde1e6d1b887efc46af5ee1f9bbccd27233e
change-id: 20241219-xdp_redirect-2b8ec79dc24e

Best regards,
-- 
Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-01-07 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 10:10 [PATCH 0/3] selftests: bpf: Migrate test_xdp_redirect.sh to test_progs Bastien Curutchet (eBPF Foundation)
2025-01-03 10:10 ` [PATCH 1/3] selftests/bpf: test_xdp_redirect: Rename BPF sections Bastien Curutchet (eBPF Foundation)
2025-01-03 13:18   ` Alexis Lothoré
2025-01-03 10:10 ` [PATCH 2/3] selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c Bastien Curutchet (eBPF Foundation)
2025-01-03 12:54   ` Alexis Lothoré
2025-01-06  7:54     ` Bastien Curutchet
2025-01-03 13:17   ` Alexis Lothoré
2025-01-06  8:24     ` Bastien Curutchet
2025-01-07 19:48   ` Martin KaFai Lau
2025-01-03 10:10 ` [PATCH 3/3] selftests/bpf: Migrate test_xdp_redirect.c to test_xdp_do_redirect.c Bastien Curutchet (eBPF Foundation)
2025-01-03 10:20 ` [PATCH 0/3] selftests: bpf: Migrate test_xdp_redirect.sh to test_progs Bastien Curutchet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox