summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdpxceiver.c
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2021-08-25 12:37:17 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-08-25 22:23:11 +0300
commitab7c95abb5f9d05470ede8e75a105c81c2dbf2c1 (patch)
tree5772834b5136d99aeccd11ef0e323c5efc1a5ad8 /tools/testing/selftests/bpf/xdpxceiver.c
parentb04fdc4ce31fe5ae411737ec6705fcdfc493d6c8 (diff)
downloadlinux-ab7c95abb5f9d05470ede8e75a105c81c2dbf2c1.tar.xz
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: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210825093722.10219-12-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.c')
-rw-r--r--tools/testing/selftests/bpf/xdpxceiver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c
index 8ff24472ef1e..bc7d6bbbb867 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@ -637,6 +637,7 @@ static void tx_only_all(struct ifobject *ifobject)
tx_only(ifobject->xsk, &frame_nb, batch_size);
pkt_cnt += batch_size;
+ usleep(10);
}
complete_tx_only_all(ifobject);