]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: add a new test to check the consumer update case
authorJason Xing <kernelxing@tencent.com>
Thu, 3 Jul 2025 14:17:12 +0000 (22:17 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Jul 2025 01:28:07 +0000 (18:28 -0700)
commit680acde13ffd10ae4b95ed7d8f1633df38180462
tree9c13eb9439cb43c0ca2d1117c2773fdbb081316f
parent1eb8b0dac1899c4f806b00253ac03b1a039663c0
selftests/bpf: add a new test to check the consumer update case

The subtest sends 33 packets at one time on purpose to see if xsk
exitting __xsk_generic_xmit() updates the global consumer of tx queue
when reaching the max loop (max_tx_budget, 32 by default). The number 33
can avoid xskq_cons_peek_desc() updates the consumer when it's about to
quit sending, to accurately check if the issue that the first patch
resolves remains. The new case will not check this issue in zero copy
mode.

Signed-off-by: Jason Xing <kernelxing@tencent.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250703141712.33190-3-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h