diff options
author | Magnus Karlsson | 2021-08-25 11:37:09 +0200 |
---|---|---|
committer | Alexei Starovoitov | 2021-08-25 12:22:00 -0700 |
commit | 13a6ebd9084a398b93e3e06ca59254df9aa95336 (patch) | |
tree | 4d3e2a8e91a4c81d5807fd7cf47430706e6c88bc /tools/testing | |
parent | 25c0a30541e4a7ddb4b45c2c923f799c76c95ef5 (diff) |
selftests: xsk: Remove unused variables
Remove unused variables and typedefs. The *_npkts variables are
incremented but never used.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-4-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.c | 3 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.h | 8 |
2 files changed, 0 insertions, 11 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c index 1b0efe566278..4d8ee636fc24 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.c +++ b/tools/testing/selftests/bpf/xdpxceiver.c @@ -70,7 +70,6 @@ #include <errno.h> #include <getopt.h> #include <asm/barrier.h> -typedef __u16 __sum16; #include <linux/if_link.h> #include <linux/if_ether.h> #include <linux/ip.h> @@ -454,7 +453,6 @@ static void complete_tx_only(struct xsk_socket_info *xsk, int batch_size) if (rcvd) { xsk_ring_cons__release(&xsk->umem->cq, rcvd); xsk->outstanding_tx -= rcvd; - xsk->tx_npkts += rcvd; } } @@ -512,7 +510,6 @@ static void rx_pkt(struct xsk_socket_info *xsk, struct pollfd *fds) xsk_ring_prod__submit(&xsk->umem->fq, rcvd); xsk_ring_cons__release(&xsk->rx, rcvd); - xsk->rx_npkts += rcvd; } static void tx_only(struct xsk_socket_info *xsk, u32 *frameptr, int batch_size) diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h index 4ce5a18b32e7..02b7d0d6f45d 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.h +++ b/tools/testing/selftests/bpf/xdpxceiver.h @@ -44,10 +44,6 @@ #define print_verbose(x...) do { if (opt_verbose) ksft_print_msg(x); } while (0) -typedef __u32 u32; -typedef __u16 u16; -typedef __u8 u8; - enum TEST_MODES { TEST_MODE_UNCONFIGURED = -1, TEST_MODE_SKB, @@ -104,10 +100,6 @@ struct xsk_socket_info { struct xsk_ring_prod tx; struct xsk_umem_info *umem; struct xsk_socket *xsk; - unsigned long rx_npkts; - unsigned long tx_npkts; - unsigned long prev_rx_npkts; - unsigned long prev_tx_npkts; u32 outstanding_tx; }; |