Lines Matching +full:1 +full:- +full:v0
2 # SPDX-License-Identifier: GPL-2.0
4 readonly NS="ns1-$(mktemp -u XXXXXX)"
8 readonly V1_IP6=2001:db8::1
10 ret=1
16 ip link add v1 type veth peer name v0 netns ${NS}
21 ip -n ${NS} link set dev v0 up
22 ip -n ${NS} addr add $V0_IP4/24 dev v0
23 ip -n ${NS} addr add $V0_IP6/64 nodad dev v0
26 ethtool -K v1 gro on
27 ethtool -K v1 tx-checksumming off
28 ip netns exec ${NS} ethtool -K v0 gro on
29 ip netns exec ${NS} ethtool -K v0 tx-checksumming off
30 } > /dev/null 2>&1
40 while sleep 1; do
41 ss -tlp | grep -q xdp_features
42 [ $? -eq 0 ] && break
50 ./xdp_features -f XDP_PASS -D $V1_IP6 -T $V0_IP6 v1 &
52 ip netns exec ${NS} ./xdp_features -t -f XDP_PASS \
53 -D $V1_IP6 -C $V1_IP6 \
54 -T $V0_IP6 v0
55 [ $? -ne 0 ] && exit
58 ./xdp_features -f XDP_DROP -D ::ffff:$V1_IP4 -T ::ffff:$V0_IP4 v1 &
60 ip netns exec ${NS} ./xdp_features -t -f XDP_DROP \
61 -D ::ffff:$V1_IP4 \
62 -C ::ffff:$V1_IP4 \
63 -T ::ffff:$V0_IP4 v0
64 [ $? -ne 0 ] && exit
67 ./xdp_features -f XDP_ABORTED -D $V1_IP6 -T $V0_IP6 v1 &
69 ip netns exec ${NS} ./xdp_features -t -f XDP_ABORTED \
70 -D $V1_IP6 -C $V1_IP6 \
71 -T $V0_IP6 v0
72 [ $? -ne 0 ] && exit
75 ./xdp_features -f XDP_TX -D ::ffff:$V1_IP4 -T ::ffff:$V0_IP4 v1 &
77 ip netns exec ${NS} ./xdp_features -t -f XDP_TX \
78 -D ::ffff:$V1_IP4 \
79 -C ::ffff:$V1_IP4 \
80 -T ::ffff:$V0_IP4 v0
81 [ $? -ne 0 ] && exit
84 ./xdp_features -f XDP_REDIRECT -D $V1_IP6 -T $V0_IP6 v1 &
86 ip netns exec ${NS} ./xdp_features -t -f XDP_REDIRECT \
87 -D $V1_IP6 -C $V1_IP6 \
88 -T $V0_IP6 v0
89 [ $? -ne 0 ] && exit
92 ./xdp_features -f XDP_NDO_XMIT -D ::ffff:$V1_IP4 -T ::ffff:$V0_IP4 v1 &
94 ip netns exec ${NS} ./xdp_features -t -f XDP_NDO_XMIT \
95 -D ::ffff:$V1_IP4 \
96 -C ::ffff:$V1_IP4 \
97 -T ::ffff:$V0_IP4 v0
102 set -e