Lines Matching +full:1 +full:- +full:6

2 # SPDX-License-Identifier: GPL-2.0
20 simple_if_init $tor1_p1 2001:db8:1::2/128 2001:db8:1::3/128
25 simple_if_fini $tor1_p1 2001:db8:1::2/128 2001:db8:1::3/128
43 __addr_add_del $spine_p1 add 2001:db8:1::1/64
44 __addr_add_del $spine_p2 add 2001:db8:2::1/64
49 __addr_add_del $spine_p2 del 2001:db8:2::1/64
50 __addr_add_del $spine_p1 del 2001:db8:1::1/64
58 local pfx="$1"; shift
59 local expected_num=$1; shift
63 sleep .1
65 num=$(ip -6 route show match ${pfx} | grep "offload" | wc -l)
67 if [ $num -eq $expected_num ]; then
71 return 1
79 ip -6 route add 2001:db8:3::/64 dev $spine_p1 metric 100
80 ipv6_offload_check "2001:db8:3::/64 dev $spine_p1 metric 100" 1
85 ip -6 route append 2001:db8:3::/64 dev $spine_p1 metric 200
86 ipv6_offload_check "2001:db8:3::/64 dev $spine_p1 metric 100" 1
93 ip -6 route append 2001:db8:3::/64 dev $spine_p1 metric 10
94 ipv6_offload_check "2001:db8:3::/64 dev $spine_p1 metric 10" 1
103 ip -6 route flush 2001:db8:3::/64 dev $spine_p1
104 ip -6 route add 2001:db8:3::/64 dev $spine_p2
105 ipv6_offload_check "2001:db8:3::/64 dev $spine_p2" 1
109 ip -6 route flush 2001:db8:3::/64
117 ip -6 route add 2001:db8:3::/64 metric 100 \
118 nexthop via 2001:db8:1::2 dev $spine_p1 \
124 ip -6 route append 2001:db8:3::/64 metric 100 \
125 nexthop via 2001:db8:1::3 dev $spine_p1
131 ip -6 route del 2001:db8:3::/64
132 ip -6 route add 2001:db8:3::/64 metric 100 \
133 nexthop via 2001:db8:1::2 dev $spine_p1 \
140 ip -6 route append 2001:db8:3::/64 metric 200 \
141 nexthop via 2001:db8:1::3 dev $spine_p1
149 ip -6 route append 2001:db8:3::/64 metric 10 \
150 nexthop via 2001:db8:1::3 dev $spine_p1
151 ipv6_offload_check "2001:db8:3::/64 metric 10" 1
160 ip -6 route flush 2001:db8:3::/64
174 ip -6 route add 2001:db8:3::/64 metric 100 dev $spine_p1
175 ipv6_offload_check "2001:db8:3::/64 metric 100" 1
177 ip -6 route replace 2001:db8:3::/64 metric 100 dev $spine_p2
178 ipv6_offload_check "2001:db8:3::/64 metric 100" 1
182 ip -6 route replace 2001:db8:3::/64 metric 100 \
183 nexthop via 2001:db8:1::2 dev $spine_p1 \
190 ip -6 route replace 2001:db8:3::/64 metric 100 dev $spine_p1
197 ip -6 route replace 2001:db8:3::/64 metric 100 \
198 nexthop via 2001:db8:1::3 dev $spine_p1 \
203 # Replace a non-existing multipath route with a multipath route and
205 ip -6 route replace 2001:db8:3::/64 metric 200 \
206 nexthop via 2001:db8:1::3 dev $spine_p1 \
209 check_err $? "multipath route not offloaded after non-existing route was 'replaced'"
211 check_err $? "multipath route offloaded after 'replacing' non-existing route"
215 ip -6 route flush 2001:db8:3::/64
225 ip -6 route add 2001:db8:3::/64 \
226 nexthop via 2001:db8:1::2 dev $spine_p1 \
228 ip -6 route add 2001:db8:4::/64 \
229 nexthop via 2001:db8:1::2 dev $spine_p1 \
235 ip -6 route del 2001:db8:3::/64
241 ip -6 route add 2001:db8:3::/64 \
242 nexthop via 2001:db8:1::2 dev $spine_p1 \
244 ip -6 route del 2001:db8:4::/64 \
245 nexthop via 2001:db8:1::2 dev $spine_p1
246 ipv6_offload_check "2001:db8:4::/64" 1
253 ip -6 route flush 2001:db8:3::/64
254 ip -6 route flush 2001:db8:4::/64
259 local batch_dir=$(mktemp -d)
277 for i in $(seq 1 $num_nhs); do
278 ip -6 address add 2001:db8:1::10:$i/128 dev $tor1_p1
279 nexthops+=" nexthop via 2001:db8:1::10:$i dev $spine_p1"
282 for i in $(seq 1 $num_rts); do
291 ip -batch $batch_dir/add.batch
292 count=$(ip -6 route show | grep offload | wc -l)
293 while [ $count -lt $total ]; do
295 count=$(ip -6 route show | grep offload | wc -l)
300 diff=$(echo "$end - $start" | bc -l)
301 test "$(echo "$diff > 60" | bc -l)" -eq 0
307 ip -batch $batch_dir/del.batch
308 for i in $(seq 1 $num_nhs); do
309 ip -6 address del 2001:db8:1::10:$i/128 dev $tor1_p1
311 rm -rf $batch_dir