selftests: xsk: Introduce rx_on and tx_on in ifobject
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 7 Sep 2021 07:19:17 +0000 (09:19 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Sep 2021 19:15:31 +0000 (21:15 +0200)
commit1856c24db0a8c51122b7b87909a98f379309ff69
treea2e9afb92347ce0759d8a3ec7ea9ca3a82af9c3c
parent119d4b02feb5c3c5045f0b42a6c48d853ab40917
selftests: xsk: Introduce rx_on and tx_on in ifobject

Introduce rx_on and tx_on in the ifobject so that we can describe if
the thread should create a socket with only tx, rx, or both. This
eliminates some test specific if statements from the code. We can also
eliminate the flow vector structure now as this is fully specified
by the tx_on and rx_on variables.

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-10-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h