]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: xsk: Replace second_step global variable
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 7 Sep 2021 07:19:18 +0000 (09:19 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Sep 2021 19:15:31 +0000 (21:15 +0200)
commit1e469d9e4aa5fdcd3e73d2e83c73e01dffd10a86
tree227284acb6e7b2252cf792e3ca5fb0a26de408e0
parent402c1f1f27d54cb94b3f69cf507abdafa71d5a9f
selftests: xsk: Replace second_step global variable

Replace the second_step global variable with a test specification
variable called total_steps that a test can be set to indicate how
many times the packet stream should be sent without reinitializing any
sockets. This eliminates test specific code in the test runner around
the bidirectional test.

The total_steps variable is 1 by default as most tests only need a
single round of packets.

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