Skip to content

Commit 3122257

Browse files
idoschPaolo Abeni
authored andcommitted
selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
In emulated environments, the bridge ports enslaved to br1 get a carrier before changing br1's PVID. This means that by the time the PVID is changed, br1 is already operational and configured with an IPv6 link-local address. When the test is run with netdevs registered by mlxsw, changing the PVID is vetoed, as changing the VID associated with an existing L3 interface is forbidden. This restriction is similar to the 8021q driver's restriction of changing the VID of an existing interface. Fix this by taking br1 down and bringing it back up when it is fully configured. With this fix, the test reliably passes on top of both the SW and HW data paths (emulated or not). Fixes: 239e754 ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q") Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 45c77fb commit 3122257

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ setup_prepare()
6161

6262
vrf_prepare
6363
mirror_gre_topo_create
64+
# Avoid changing br1's PVID while it is operational as a L3 interface.
65+
ip link set dev br1 down
6466

6567
ip link set dev $swp3 master br1
6668
bridge vlan add dev br1 vid 555 pvid untagged self
69+
ip link set dev br1 up
6770
ip address add dev br1 192.0.2.129/28
6871
ip address add dev br1 2001:db8:2::1/64
6972

0 commit comments

Comments
 (0)