selftests/xsk: Query for native XDP support
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Thu, 1 Sep 2022 11:48:08 +0000 (13:48 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 2 Sep 2022 13:37:37 +0000 (15:37 +0200)
commit0d68e6fe12ada8fbaf35f0978aaf18dfb8d2dbb5
tree448b715151ec90929fac26b5a6e40fdc762111b4
parent8cc61b7a6416541261d56bcdd93a711407f711ba
selftests/xsk: Query for native XDP support

Currently, xdpxceiver assumes that underlying device supports XDP in
native mode - it is fine by now since tests can run only on a veth pair.
Future commit is going to allow running test suite against physical
devices, so let us query the device if it is capable of running XDP
programs in native mode. This way xdpxceiver will not try to run
TEST_MODE_DRV if device being tested is not supporting it.

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