summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Daskalakis <dimitri.daskalakis1@gmail.com>2025-08-20 18:40:23 -0700
committerJakub Kicinski <kuba@kernel.org>2025-08-22 07:46:27 -0700
commitbbd885b193cc8a651e18eef74f0e094acbc802b8 (patch)
tree64cdb93ea187cb5569cd34a1af22db0cae3956ef
parentd06d70eb6af441c59ec8fc71df0c47427321318b (diff)
selftests: drv-net: xdp: Validate single-buff XDP_TX in multi-buff mode
Validate that drivers with multi-buff XDP programs properly reinitialize xdp_buff between packets. Signed-off-by: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com> Link: https://patch.msgid.link/20250821014023.1481662-4-dimitri.daskalakis1@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rwxr-xr-xtools/testing/selftests/drivers/net/xdp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/xdp.py b/tools/testing/selftests/drivers/net/xdp.py
index cea24c9b573e..35e9495cd506 100755
--- a/tools/testing/selftests/drivers/net/xdp.py
+++ b/tools/testing/selftests/drivers/net/xdp.py
@@ -358,7 +358,10 @@ def test_xdp_native_tx_mb(cfg):
"""
bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o",
"xdp.frags", 9000)
- _test_xdp_native_tx(cfg, bpf_info, [8000])
+ # The first packet ensures we exercise the fragmented code path.
+ # And the subsequent 0-sized packet ensures the driver
+ # reinitializes xdp_buff correctly.
+ _test_xdp_native_tx(cfg, bpf_info, [8000, 0])
def _validate_res(res, offset_lst, pkt_sz_lst):