]> www.infradead.org Git - users/willy/pagecache.git/commit
selftests: drv-net: add xdp cases for ping.py
authorTaehee Yoo <ap420073@gmail.com>
Sun, 9 Mar 2025 13:42:19 +0000 (13:42 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Mar 2025 20:31:12 +0000 (13:31 -0700)
commit75cc19c8ff8932d7da23480a49d1f9a050289c37
treeb18d0123dd403109186f1875ed2ebd502a0de30b
parenta70f891e0fa0435379ad4950e156a15a4ef88b4d
selftests: drv-net: add xdp cases for ping.py

ping.py has 3 cases, test_v4, test_v6 and test_tcp.
But these cases are not executed on the XDP environment.
So, it adds XDP environment, existing tests(test_v4, test_v6, and
test_tcp) are executed too on the below XDP environment.
So, it adds XDP cases.
1. xdp-generic + single-buffer
2. xdp-generic + multi-buffer
3. xdp-native + single-buffer
4. xdp-native + multi-buffer
5. xdp-offload

It also makes test_{v4 | v6 | tcp} sending large size packets. this may
help to check whether multi-buffer is working or not.

Note that the physical interface may be down and then up when xdp is
attached or detached.
This takes some period to activate traffic. So sleep(10) is
added if the test interface is the physical interface.
netdevsim and veth type interfaces skip sleep.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Link: https://patch.msgid.link/20250309134219.91670-9-ap420073@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/ping.py
tools/testing/selftests/net/lib/xdp_dummy.bpf.c