Skip to content

Commit bbd885b

Browse files
Dimitri Daskalakiskuba-moo
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d06d70e commit bbd885b

File tree

1 file changed

+4
-1
lines changed
  • tools/testing/selftests/drivers/net

1 file changed

+4
-1
lines changed

tools/testing/selftests/drivers/net/xdp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ def test_xdp_native_tx_mb(cfg):
358358
"""
359359
bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o",
360360
"xdp.frags", 9000)
361-
_test_xdp_native_tx(cfg, bpf_info, [8000])
361+
# The first packet ensures we exercise the fragmented code path.
362+
# And the subsequent 0-sized packet ensures the driver
363+
# reinitializes xdp_buff correctly.
364+
_test_xdp_native_tx(cfg, bpf_info, [8000, 0])
362365

363366

364367
def _validate_res(res, offset_lst, pkt_sz_lst):

0 commit comments

Comments
 (0)