selftests: xsk: Introduce pacing of traffic
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 22 Sep 2021 07:56:10 +0000 (09:56 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 27 Sep 2021 22:18:35 +0000 (00:18 +0200)
commit1bf3649688c103f80690a7088a105924f9d5a6e4
tree2779af6a76a183962d124a5477352dfac69cd4f9
parent89013b8a29281fa42e39406b8b25672cb6ce2341
selftests: xsk: Introduce pacing of traffic

Introduce pacing of traffic so that the Tx thread can never send more
packets than the receiver has processed plus the number of packets it
can have in its umem. So at any point in time, the number of in flight
packets (not processed by the Rx thread) are less than or equal to the
number of packets that can be held in the Rx thread's umem.

The batch size is also increased to improve running time.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210922075613.12186-11-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h