selftests/xsk: Make batch size variable
authorTushar Vyavahare <tushar.vyavahare@intel.com>
Tue, 2 Apr 2024 11:45:24 +0000 (11:45 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 3 Apr 2024 14:00:57 +0000 (16:00 +0200)
commitc3bd015090f24dcd2e839db1401e948ad95ce803
tree778b04e30d8b6a1e4f71f4a5bb13fd811b567dcc
parent7effe3fdc049a34c56a68671100b5570e53e8f0a
selftests/xsk: Make batch size variable

Convert the constant BATCH_SIZE into a variable named batch_size to allow
dynamic modification at runtime. This is required for the forthcoming
changes to support testing different hardware ring sizes.

While running these tests, a bug was identified when the batch size is
roughly the same as the NIC ring size. This has now been addressed by
Maciej's fix in commit 913eda2b08cc ("i40e: xsk: remove count_mask").

Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20240402114529.545475-3-tushar.vyavahare@intel.com
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h