Lines Matching +full:add +full:- +full:on
2 # SPDX-License-Identifier: GPL-2.0
63 # Test that it is possible to set an IP address on a VRF upper despite
67 ip link add name vrf-test type vrf table 10
68 ip link set dev $swp1 master vrf-test
70 ip -4 address add 192.0.2.1/24 dev vrf-test
71 check_err $? "failed to set IPv4 address on VRF"
72 ip -6 address add 2001:db8:1::1/64 dev vrf-test
73 check_err $? "failed to set IPv6 address on VRF"
75 log_test "RIF - setting IP address on VRF"
77 ip link del dev vrf-test
87 ip addr add dev $swp1 192.0.2.1/28
91 ip link add name br1 up type bridge vlan_filtering 0
94 ip addr add dev br1 192.0.2.17/28
98 ip link add name d up type dummy
110 log_test "RIF - attach port with bad MAC to bridge with set MAC"
126 ip link add name br0 type bridge vlan_filtering 1
129 ip link add link br0 name br0.10 type vlan id 10
130 ip -6 address add 2001:db8:1::1/64 dev br0.10
134 ip link add link br0 name br0.20 type vlan id 20
135 ip -6 address add 2001:db8:1::1/64 dev br0.20
151 ip link add name br0 type bridge vlan_filtering 1
153 ip -6 address add 2001:db8::1/64 dev br0
155 ip link add link br0 name br0.10 type vlan id 10
156 ip -6 address add 2001:db8:1::1/64 dev br0.10
158 ip link add link br0 name br0.20 type vlan id 20
159 ip -6 address add 2001:db8:2::1/64 dev br0.20
164 ip -6 address add 2001:db8:1::1/64 dev $swp1
165 ip -6 address del 2001:db8:1::1/64 dev $swp1
173 # unnecessary references on related structs. See commit 9e25826ffc94
178 ip link add name br0 type bridge vlan_filtering 1
181 bridge vlan add vid 10 dev $swp1 pvid untagged
182 bridge vlan add vid 10 dev $swp1 untagged
183 bridge vlan add vid 10 dev $swp1 pvid
184 bridge vlan add vid 10 dev $swp1
191 # Allow netdevices to be re-created following the reload
205 ip link add link $swp1 name $swp1.1 type vlan id 1
215 # Test that on a given port a VLAN is only used once. Either as VLAN
216 # in a VLAN-aware bridge or as a VLAN device
219 ip link add name br0 type bridge vlan_filtering 1
221 bridge vlan add vid 10 dev $swp1
223 ip link add link $swp1 name $swp1.10 type vlan id 10 &> /dev/null
227 ip link add link $swp1 name $swp1.10 type vlan id 10
229 bridge vlan add vid 10 dev $swp1 &> /dev/null
230 check_fail $? "managed to add bridge vlan when should not"
241 # ports member in the VLAN. We use the offload indication on routes
242 # configured on the RIF to understand if it was created / destroyed
245 ip link add name br0 type bridge vlan_filtering 1
251 ip link add link br0 name br0.10 up type vlan id 10
252 ip -6 address add 2001:db8:1::1/64 dev br0.10
255 ip -6 route get fibmatch 2001:db8:1::2 dev br0.10
258 bridge vlan add vid 10 dev $swp1
260 ip -6 route get fibmatch 2001:db8:1::2 dev br0.10
265 ip -6 route get fibmatch 2001:db8:1::2 dev br0.10
270 ip -6 route get fibmatch 2001:db8:1::2 dev br0.10
284 # offload indication on routes configured on the RIF to understand if
288 ip link add name bond1 type bond mode 802.3ad
295 ip link add link bond1 name bond1.10 up type vlan id 10
296 ip -6 address add 2001:db8:1::1/64 dev bond1
297 ip -6 address add 2001:db8:2::1/64 dev bond1.10
300 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
301 check_err $? "subport rif was not created on lag device"
303 ip -6 route get fibmatch 2001:db8:2::2 dev bond1.10
304 check_err $? "subport rif was not created on vlan device"
308 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
311 ip -6 route get fibmatch 2001:db8:2::2 dev bond1.10
316 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
319 ip -6 route get fibmatch 2001:db8:2::2 dev bond1.10
332 # offload indication on routes configured on the RIF to understand if
336 ip link add name bond1 type bond mode 802.3ad
343 ip -6 address add 2001:db8:1::1/64 dev bond1
346 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
347 check_err $? "subport rif was not created on lag device"
351 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
357 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
358 check_err $? "subport rif of lag device was destroyed after re-adding a port and removing another"
362 ip -6 route get fibmatch 2001:db8:1::2 dev bond1
376 ip link add name br10 type bridge
377 ip link add name br20 type bridge
378 ip link add name br30 type bridge
379 ip link add link $swp1 name $swp1.10 type vlan id 10
380 ip link add link $swp1 name $swp1.20 type vlan id 20
381 ip link add link $swp1 name $swp1.30 type vlan id 30
403 ip link add name bond1 type bond mode 802.3ad
409 ip link add link bond1 name bond1.10 type vlan id 10
410 ip link add link bond1 name bond1.20 type vlan id 20
412 ip link add name br0 type bridge vlan_filtering 1
415 ip link add name br10 type bridge
418 ip link add name br20 type bridge
436 ip -6 address add 2001:db8:1::1/64 dev $swp1
437 check_err $? "failed to configure ip address on $swp1"
439 ip link add link $swp1 name $swp1.10 type vlan id 10
440 ip -6 address add 2001:db8:10::1/64 dev $swp1.10
441 check_err $? "failed to configure ip address on $swp1.10"
443 ip link add link $swp1 name $swp1.20 type vlan id 20
444 ip -6 address add 2001:db8:20::1/64 dev $swp1.20
445 check_err $? "failed to configure ip address on $swp1.20"
481 ip link add name br0 type bridge vlan_filtering 1
484 ip link add link br0 name br0.10 type vlan id 10
486 ip -6 address add 2001:db8:1::1/64 dev br0.10
487 ip link add link br0.10 name macvlan0 type macvlan mode private
492 ip link add name vrf-test type vrf table 10
493 ip link set dev br0.10 master vrf-test
495 ip link del dev vrf-test
497 ip link add name br-test type bridge
498 ip link set dev br0.10 master br-test &> /dev/null
500 ip link del dev br-test
513 ip link add name br0 type bridge
516 bridge fdb add de:ad:be:ef:13:37 dev $swp1 master extern_learn
532 ip -4 address add 192.0.2.1/24 dev $swp1
533 ip -6 address add 2001:db8:1::1/64 dev $swp1
535 ip -4 neigh add 192.0.2.2 lladdr de:ad:be:ef:13:37 nud perm dev $swp1
536 ip -6 neigh add 2001:db8:1::2 lladdr de:ad:be:ef:13:37 nud perm \
540 ip -4 neigh show dev $swp1 192.0.2.2
543 ip -6 neigh show dev $swp1 2001:db8:1::2
548 ip -6 neigh del 2001:db8:1::2 dev $swp1
549 ip -4 neigh del 192.0.2.2 dev $swp1
550 ip -6 address del 2001:db8:1::1/64 dev $swp1
551 ip -4 address del 192.0.2.1/24 dev $swp1
564 ip -4 route add 198.51.100.0/24 vrf v$swp1 \
566 ip -6 route add 2001:db8:2::/64 vrf v$swp1 \
570 ip -4 route show 198.51.100.0/24 vrf v$swp1
573 ip -6 route show 2001:db8:2::/64 vrf v$swp1
580 ip -4 route show 198.51.100.0/24 vrf v$swp1
583 ip -6 route show 2001:db8:2::/64 vrf v$swp1
590 ip -4 route show 198.51.100.0/24 vrf v$swp1
591 check_err $? "ipv4 nexthop not marked as offloaded after neigh add"
593 ip -6 route show 2001:db8:2::/64 vrf v$swp1
594 check_err $? "ipv6 nexthop not marked as offloaded after neigh add"
598 ip -6 route del 2001:db8:2::/64 vrf v$swp1
599 ip -4 route del 198.51.100.0/24 vrf v$swp1
615 ip nexthop add id 1 via 192.0.2.3 fdb
618 ip nexthop add id 1 encap mpls 200/300 via 192.0.2.3 dev $swp1
621 ip nexthop add id 1 dev $swp1
622 ip nexthop add id 2 dev $swp1
623 ip nexthop add id 3 via 192.0.2.3 dev $swp1
624 ip nexthop add id 10 group 1/2
625 check_fail $? "managed to configure a nexthop group with device-only nexthops when should not"
627 ip nexthop add id 10 group 3 type resilient buckets 7
630 ip nexthop add id 10 group 3 type resilient buckets 129
633 ip nexthop add id 10 group 1/2 type resilient buckets 32
634 …check_fail $? "managed to configure a resilient nexthop group with device-only nexthops when shoul…
636 ip nexthop add id 10 group 3 type resilient buckets 32
639 check_fail $? "managed to populate a nexthop bucket with a device-only nexthop when should not"
641 log_test "nexthop objects - invalid configurations"
661 ip nexthop add id 1 via 192.0.2.2 dev $swp1
708 ip nexthop add id 1 via 192.0.2.2 dev $swp1
709 ip nexthop add id 2 via 2001:db8:1::2 dev $swp1
710 ip nexthop add id 10 group 1/2
768 ip nexthop add id 1 via 192.0.2.2 dev $swp1
769 ip nexthop add id 2 via 2001:db8:1::2 dev $swp1
770 ip nexthop add id 10 group 1/2 type resilient buckets 32 idle_timer 0
828 ip nexthop add id 1 blackhole
833 ip nexthop add id 10 group 1
853 ip nexthop add id 1 via 192.0.2.2 dev $swp1
894 ip link add name br1 up type bridge vlan_filtering 0
896 ip link add link $swp1 name $swp1.10 type vlan id 10
899 bridge link set dev $swp1.10 locked on
900 check_fail $? "managed to set locked flag on a VLAN upper"
905 bridge link set dev $swp1 locked on
906 check_fail $? "managed to set locked flag on a bridge port that has a VLAN upper"
909 bridge link set dev $swp1 locked on
911 ip link add link $swp1 name $swp1.10 type vlan id 10
912 check_fail $? "managed to configure a VLAN upper on a locked port"
929 log_test "devlink reload - last test"