All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
@ 2022-05-02  8:45 Ido Schimmel
  2022-05-03  9:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Ido Schimmel @ 2022-05-02  8:45 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, pabeni, edumazet, petrm, mlxsw, Ido Schimmel

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: 239e754af854 ("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>
---
 tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh
index a3402cd8d5b6..9ff22f28032d 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh
@@ -61,9 +61,12 @@ setup_prepare()
 
 	vrf_prepare
 	mirror_gre_topo_create
+	# Avoid changing br1's PVID while it is operational as a L3 interface.
+	ip link set dev br1 down
 
 	ip link set dev $swp3 master br1
 	bridge vlan add dev br1 vid 555 pvid untagged self
+	ip link set dev br1 up
 	ip address add dev br1 192.0.2.129/28
 	ip address add dev br1 2001:db8:2::1/64
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
  2022-05-02  8:45 [PATCH net] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational Ido Schimmel
@ 2022-05-03  9:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-03  9:40 UTC (permalink / raw)
  To: Ido Schimmel; +Cc: netdev, davem, kuba, pabeni, edumazet, petrm, mlxsw

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon,  2 May 2022 11:45:07 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
    https://git.kernel.org/netdev/net/c/3122257c02af

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-03  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02  8:45 [PATCH net] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational Ido Schimmel
2022-05-03  9:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.