]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/xsk: Add tail adjustment tests and support check
authorTushar Vyavahare <tushar.vyavahare@intel.com>
Thu, 10 Apr 2025 03:31:16 +0000 (03:31 +0000)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 10 Apr 2025 17:08:55 +0000 (10:08 -0700)
commit4b302092553c204599d02a97a10f5b9b70f2c0a0
tree780851c14f5adbd749ea0180aa4da223d59083fb
parent3e730fe2af867d49b8c0eed65fe824079f7f377a
selftests/xsk: Add tail adjustment tests and support check

Introduce tail adjustment functionality in xskxceiver using
bpf_xdp_adjust_tail(). Add `xsk_xdp_adjust_tail` to modify packet sizes
and drop unmodified packets. Implement `is_adjust_tail_supported` to check
helper availability. Develop packet resizing tests, including shrinking
and growing scenarios, with functions for both single-buffer and
multi-buffer cases. Update the test framework to handle various scenarios
and adjust MTU settings. These changes enhance the testing of packet tail
adjustments, improving AF_XDP framework reliability.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250410033116.173617-3-tushar.vyavahare@intel.com
tools/testing/selftests/bpf/progs/xsk_xdp_progs.c
tools/testing/selftests/bpf/xsk_xdp_common.h
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h