Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 047dbb27 authored by William Tu's avatar William Tu Committed by David S. Miller
Browse files

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: default avatarWilliam Tu <u9012063@gmail.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 159fe88e
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,11 @@ cleanup()
	ip netns del ns2 2> /dev/null
	ip netns del ns2 2> /dev/null
}
}


ip link set dev lo xdpgeneric off 2>/dev/null > /dev/null
if [ $? -ne 0 ];then
	echo "selftests: [SKIP] Could not run test without the ip xdpgeneric support"
	exit 0
fi
set -e
set -e


ip netns add ns1
ip netns add ns1