selftests/xsk: fix too-many-frags multi-buffer Tx test
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Sun, 19 Jul 2026 13:56:08 +0000 (15:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Jul 2026 22:12:14 +0000 (15:12 -0700)
commitc5b1ca6a02886f00170ed91b757e244f23259e91
treebc4b288f9b11cbd3f83dba1e1cafa813ecb707e0
parent72f2b4516faf55d4dfac2414649d3cffa5fd2c5e
selftests/xsk: fix too-many-frags multi-buffer Tx test

The too-many-frags test describes a packet that is valid from the Tx
ring ownership point of view, but invalid for transmission because it
exceeds the supported number of fragments.

Keep the generated Tx descriptors valid so that __send_pkts() accounts
them as outstanding descriptors that must be reclaimed through the CQ.
Then mark the corresponding Rx packet invalid so the test still does
not expect the oversized packet to appear on the receive side.

Add a valid synchronization packet after the oversized packet so the
test can verify that the Tx path drains the bad packet and resumes at
the next packet boundary.

Reviewed-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260719135609.147823-6-maciej.fijalkowski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_xsk.c