diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2021-03-30 01:43:16 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-03-30 19:24:40 +0300 |
commit | ae6b6a17800f34dd5215286b44a4e99a0a1cf862 (patch) | |
tree | a91017ed6daa5ea0a74a199e09362ecddda209df /tools/testing/selftests/bpf/xdpxceiver.c | |
parent | 96539f1c5efb0022b94412e8623722aad23dee6b (diff) | |
download | linux-ae6b6a17800f34dd5215286b44a4e99a0a1cf862.tar.xz |
selftests: xsk: Remove unused defines
Remove two unused defines.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210329224316.17793-18-maciej.fijalkowski@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.c')
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c index 6d87bdf3574a..1135fb980814 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.c +++ b/tools/testing/selftests/bpf/xdpxceiver.c @@ -456,7 +456,7 @@ static void complete_tx_only(struct xsk_socket_info *xsk, int batch_size) if (!xsk->outstanding_tx) return; - if (!NEED_WAKEUP || xsk_ring_prod__needs_wakeup(&xsk->tx)) + if (xsk_ring_prod__needs_wakeup(&xsk->tx)) kick_tx(xsk); rcvd = xsk_ring_cons__peek(&xsk->umem->cq, batch_size, &idx); @@ -544,9 +544,8 @@ static void tx_only(struct xsk_socket_info *xsk, u32 *frameptr, int batch_size) xsk_ring_prod__submit(&xsk->tx, batch_size); if (!tx_invalid_test) { xsk->outstanding_tx += batch_size; - } else { - if (!NEED_WAKEUP || xsk_ring_prod__needs_wakeup(&xsk->tx)) - kick_tx(xsk); + } else if (xsk_ring_prod__needs_wakeup(&xsk->tx)) { + kick_tx(xsk); } *frameptr += batch_size; *frameptr %= num_frames; |