Ensure single buffer XDP functions correctly by covering the following cases: 1) Zero size payload 2) Full MTU 3) Single buffer packets through a multi-buffer XDP program
These changes were tested with netdevsim and fbnic.
# ./ksft-net-drv/drivers/net/xdp.py TAP version 13 1..10 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_sb ok 6 xdp.test_xdp_native_tx_mb # Failed run: pkt_sz 2048, offset 1. Last successful run: pkt_sz 1024, offset 256. Reason: Adjustment failed ok 7 xdp.test_xdp_native_adjst_tail_grow_data ok 8 xdp.test_xdp_native_adjst_tail_shrnk_data # Failed run: pkt_sz 512, offset -256. Last successful run: pkt_sz 512, offset -128. Reason: Adjustment failed ok 9 xdp.test_xdp_native_adjst_head_grow_data # Failed run: pkt_sz (2048) > HDS threshold (1536) and offset 64 > 48 ok 10 xdp.test_xdp_native_adjst_head_shrnk_data # Totals: pass:10 fail:0 xfail:0 xpass:0 skip:0 error:0
Dimitri Daskalakis (3): selftests: drv-net: xdp: Extract common XDP_TX setup/validation. selftests: drv-net: xdp: Add a single-buffer XDP_TX test. selftests: drv-net: xdp: Validate single-buff XDP_TX in multi-buff mode
tools/testing/selftests/drivers/net/xdp.py | 71 ++++++++++++++++++---- 1 file changed, 58 insertions(+), 13 deletions(-)