Commit ae6b6a17 authored by Björn Töpel's avatar Björn Töpel Committed by Alexei Starovoitov

selftests: xsk: Remove unused defines

Remove two unused defines.
Signed-off-by: default avatarBjörn Töpel <bjorn.topel@intel.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210329224316.17793-18-maciej.fijalkowski@intel.com
parent 96539f1c
...@@ -456,7 +456,7 @@ static void complete_tx_only(struct xsk_socket_info *xsk, int batch_size) ...@@ -456,7 +456,7 @@ static void complete_tx_only(struct xsk_socket_info *xsk, int batch_size)
if (!xsk->outstanding_tx) if (!xsk->outstanding_tx)
return; return;
if (!NEED_WAKEUP || xsk_ring_prod__needs_wakeup(&xsk->tx)) if (xsk_ring_prod__needs_wakeup(&xsk->tx))
kick_tx(xsk); kick_tx(xsk);
rcvd = xsk_ring_cons__peek(&xsk->umem->cq, batch_size, &idx); 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) ...@@ -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); xsk_ring_prod__submit(&xsk->tx, batch_size);
if (!tx_invalid_test) { if (!tx_invalid_test) {
xsk->outstanding_tx += batch_size; xsk->outstanding_tx += batch_size;
} else { } else if (xsk_ring_prod__needs_wakeup(&xsk->tx)) {
if (!NEED_WAKEUP || xsk_ring_prod__needs_wakeup(&xsk->tx)) kick_tx(xsk);
kick_tx(xsk);
} }
*frameptr += batch_size; *frameptr += batch_size;
*frameptr %= num_frames; *frameptr %= num_frames;
......
...@@ -34,13 +34,11 @@ ...@@ -34,13 +34,11 @@
#define IP_PKT_TOS 0x9 #define IP_PKT_TOS 0x9
#define UDP_PKT_SIZE (IP_PKT_SIZE - sizeof(struct iphdr)) #define UDP_PKT_SIZE (IP_PKT_SIZE - sizeof(struct iphdr))
#define UDP_PKT_DATA_SIZE (UDP_PKT_SIZE - sizeof(struct udphdr)) #define UDP_PKT_DATA_SIZE (UDP_PKT_SIZE - sizeof(struct udphdr))
#define TMOUT_SEC (3)
#define EOT (-1) #define EOT (-1)
#define USLEEP_MAX 200000 #define USLEEP_MAX 200000
#define SOCK_RECONF_CTR 10 #define SOCK_RECONF_CTR 10
#define BATCH_SIZE 64 #define BATCH_SIZE 64
#define POLL_TMOUT 1000 #define POLL_TMOUT 1000
#define NEED_WAKEUP true
#define DEFAULT_PKT_CNT 10000 #define DEFAULT_PKT_CNT 10000
#define RX_FULL_RXQSIZE 32 #define RX_FULL_RXQSIZE 32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment