linux/tools/testing/selftests/net/lib
Mohsin Bashir d6444ebc97 selftests: drv-net: Test head-adjustment support
Add test to validate the headroom adjustment support for both extension
and the shrinking cases. For the extension part, eat up space from
the start of payload data whereas, for the shrinking part, populate
the newly available space with a tag. In the user-space, validate that a
test string is manipulated accordingly.
The negative and positive offset values result in shrinking and growing of
headroom (growing and shrinking of payload) respectively.

TAP version 13
1..9
ok 1 xdp.test_xdp_native_pass_sb
ok 2 xdp.test_xdp_native_pass_mb
ok 3 xdp.test_xdp_native_drop_sb
ok 4 xdp.test_xdp_native_drop_mb
ok 5 xdp.test_xdp_native_tx_mb
\# Failed run: pkt_sz 512, ... offset 1. Reason: Adjustment failed
ok 6 xdp.test_xdp_native_adjst_tail_grow_data
ok 7 xdp.test_xdp_native_adjst_tail_shrnk_data
\# Failed run: pkt_sz 512, ... offset -128. Reason: Adjustment failed
ok 8 xdp.test_xdp_native_adjst_head_grow_data
\# Failed run: pkt_sz (512) > HDS threshold (0) and offset 64 > 48
ok 9 xdp.test_xdp_native_adjst_head_shrnk_data
\# Totals: pass:9 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
Link: https://patch.msgid.link/20250719083059.3209169-6-mohsin.bashr@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-07-22 18:15:53 -07:00
..
py selftests: net: prevent Python from buffering the output 2025-07-17 16:27:38 -07:00
sh selftests: net: lib: Introduce deferred commands 2024-10-22 13:33:47 +02:00
.gitignore selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
csum.c selftests: net: csum: Clean up recv_verify_packet_ipv6 2024-10-03 16:44:28 -07:00
ksft.h selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
Makefile selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
xdp_dummy.bpf.c selftests: drv-net: add xdp cases for ping.py 2025-03-10 13:31:12 -07:00
xdp_helper.c selftests: net: retry when bind returns EBUSY in xdp_helper 2025-04-28 15:49:10 -07:00
xdp_native.bpf.c selftests: drv-net: Test head-adjustment support 2025-07-22 18:15:53 -07:00