]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
authorIdo Schimmel <idosch@nvidia.com>
Mon, 2 May 2022 08:45:07 +0000 (11:45 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 May 2022 09:21:14 +0000 (11:21 +0200)
commit9559c3a796d8394a0ccee803374df68280cc5fb6
tree472c8fc7dbe950501e57d386f493e82c31348edd
parent99043d45393e84611b45464ea4a55d1c9ba118cf
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: 160e77d06cd3 ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/20220502084507.364774-1-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh