diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2021-09-07 09:19:12 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-09-10 21:15:30 +0200 |
commit | 83f4ae2f26bd67c58d528c3967c5ad3e58098be3 (patch) | |
tree | 1201fbe2934380fcb82caad87b86b6fa152858f5 /tools/testing/selftests/bpf/xdpxceiver.h | |
parent | ce74acaf015c5ac9365abc017af051560950e46b (diff) | |
download | lwn-83f4ae2f26bd67c58d528c3967c5ad3e58098be3.tar.gz lwn-83f4ae2f26bd67c58d528c3967c5ad3e58098be3.zip |
selftests: xsk: Move num_frames and frame_headroom to xsk_umem_info
Move the global variables num_frames and frame_headroom to struct
xsk_umem_info. They describe properties of the umem so no reason for
them to be global.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20210907071928.9750-5-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h index e279aa893438..0d93a9e6c4f3 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.h +++ b/tools/testing/selftests/bpf/xdpxceiver.h @@ -71,7 +71,6 @@ enum stat_test_type { static int configured_mode; static bool opt_pkt_dump; -static u32 num_frames = DEFAULT_PKT_CNT / 4; static bool second_step; static int test_type; @@ -81,12 +80,13 @@ static u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; static u32 xdp_bind_flags = XDP_USE_NEED_WAKEUP | XDP_COPY; static int stat_test_type; static u32 rxqsize; -static u32 frame_headroom; struct xsk_umem_info { struct xsk_ring_prod fq; struct xsk_ring_cons cq; struct xsk_umem *umem; + u32 num_frames; + u32 frame_headroom; void *buffer; }; |