Skip to content

Commit

Permalink
selftests: bpf: add check for ip XDP redirect
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Cc: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
williamtu authored and davem330 committed Aug 11, 2017
1 parent 159fe88 commit 047dbb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/bpf/test_xdp_redirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ cleanup()
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

ip netns add ns1
Expand Down

0 comments on commit 047dbb2

Please sign in to comment.