diff options
author | Tushar Vyavahare <tushar.vyavahare@intel.com> | 2024-04-02 11:45:24 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-04-03 16:00:57 +0200 |
commit | c3bd015090f24dcd2e839db1401e948ad95ce803 (patch) | |
tree | 778b04e30d8b6a1e4f71f4a5bb13fd811b567dcc /tools/testing/selftests/bpf/xskxceiver.h | |
parent | 7effe3fdc049a34c56a68671100b5570e53e8f0a (diff) | |
download | lwn-c3bd015090f24dcd2e839db1401e948ad95ce803.tar.gz lwn-c3bd015090f24dcd2e839db1401e948ad95ce803.zip |
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
Diffstat (limited to 'tools/testing/selftests/bpf/xskxceiver.h')
-rw-r--r-- | tools/testing/selftests/bpf/xskxceiver.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/xskxceiver.h b/tools/testing/selftests/bpf/xskxceiver.h index f174df2d693f..425304e52f35 100644 --- a/tools/testing/selftests/bpf/xskxceiver.h +++ b/tools/testing/selftests/bpf/xskxceiver.h @@ -44,7 +44,7 @@ #define MAX_ETH_JUMBO_SIZE 9000 #define USLEEP_MAX 10000 #define SOCK_RECONF_CTR 10 -#define BATCH_SIZE 64 +#define DEFAULT_BATCH_SIZE 64 #define POLL_TMOUT 1000 #define THREAD_TMOUT 3 #define DEFAULT_PKT_CNT (4 * 1024) @@ -91,6 +91,7 @@ struct xsk_socket_info { struct pkt_stream *pkt_stream; u32 outstanding_tx; u32 rxqsize; + u32 batch_size; u8 dst_mac[ETH_ALEN]; u8 src_mac[ETH_ALEN]; }; |