Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: bpf: add check for ip XDP redirect

Kernel test robot reports error when running test_xdp_redirect.sh.
Check if ip tool supports xdpgeneric, if not, skip the test.

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

William Tu and committed by
David S. Miller
047dbb27 159fe88e

+5
+5
tools/testing/selftests/bpf/test_xdp_redirect.sh
··· 23 23 ip netns del ns2 2> /dev/null 24 24 } 25 25 26 + ip link set dev lo xdpgeneric off 2>/dev/null > /dev/null 27 + if [ $? -ne 0 ];then 28 + echo "selftests: [SKIP] Could not run test without the ip xdpgeneric support" 29 + exit 0 30 + fi 26 31 set -e 27 32 28 33 ip netns add ns1