Commit bbd885b1 authored by Dimitri Daskalakis's avatar Dimitri Daskalakis Committed by Jakub Kicinski
Browse files

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: default avatarDimitri Daskalakis <dimitri.daskalakis1@gmail.com>
Link: https://patch.msgid.link/20250821014023.1481662-4-dimitri.daskalakis1@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d06d70eb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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):