You need to sign in or sign up before continuing.
提交 ab7c95ab 编写于 作者: M Magnus Karlsson 提交者: Alexei Starovoitov

selftests: xsk: Decrease sending speed

Decrease sending speed to avoid potentially overflowing some buffers
in the skb case that leads to dropped packets we cannot control (and
thus the tests may generate false negatives). Decrease batch size and
introduce a usleep in the transmit thread to not overflow the
receiver.
Signed-off-by: NMagnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-12-magnus.karlsson@gmail.com
上级 b04fdc4c
...@@ -637,6 +637,7 @@ static void tx_only_all(struct ifobject *ifobject) ...@@ -637,6 +637,7 @@ static void tx_only_all(struct ifobject *ifobject)
tx_only(ifobject->xsk, &frame_nb, batch_size); tx_only(ifobject->xsk, &frame_nb, batch_size);
pkt_cnt += batch_size; pkt_cnt += batch_size;
usleep(10);
} }
complete_tx_only_all(ifobject); complete_tx_only_all(ifobject);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define UDP_PKT_DATA_SIZE (UDP_PKT_SIZE - sizeof(struct udphdr)) #define UDP_PKT_DATA_SIZE (UDP_PKT_SIZE - sizeof(struct udphdr))
#define USLEEP_MAX 10000 #define USLEEP_MAX 10000
#define SOCK_RECONF_CTR 10 #define SOCK_RECONF_CTR 10
#define BATCH_SIZE 64 #define BATCH_SIZE 8
#define POLL_TMOUT 1000 #define POLL_TMOUT 1000
#define DEFAULT_PKT_CNT (4 * 1024) #define DEFAULT_PKT_CNT (4 * 1024)
#define RX_FULL_RXQSIZE 32 #define RX_FULL_RXQSIZE 32
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册