* [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup
@ 2020-10-29 16:09 Russell King
2020-10-29 16:28 ` Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King @ 2020-10-29 16:09 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: David S. Miller, netdev, Vivien Didelot, Florian Fainelli,
Vladimir Oltean, Jakub Kicinski
DSA assumes that a bridge which has vlan filtering disabled is not
vlan aware, and ignores all vlan configuration. However, the kernel
software bridge code allows configuration in this state.
This causes the kernel's idea of the bridge vlan state and the
hardware state to disagree, so "bridge vlan show" indicates a correct
configuration but the hardware lacks all configuration. Even worse,
enabling vlan filtering on a DSA bridge immediately blocks all traffic
which, given the output of "bridge vlan show", is very confusing.
Allow the VLAN configuration to be updated on Marvell DSA bridges,
otherwise we end up cutting all traffic when enabling vlan filtering.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
This is the revised version of the patch that has been waiting a long
time to fix this issue on the Marvell DSA switches.
drivers/net/dsa/mv88e6xxx/chip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index bd297ae7cf9e..72340c17f099 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2851,6 +2851,7 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
chip->ds = ds;
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
+ ds->configure_vlan_while_not_filtering = true;
mv88e6xxx_reg_lock(chip);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup
2020-10-29 16:09 [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup Russell King
@ 2020-10-29 16:28 ` Florian Fainelli
2020-10-29 21:27 ` Vladimir Oltean
2020-10-30 21:31 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2020-10-29 16:28 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit
Cc: David S. Miller, netdev, Vivien Didelot, Vladimir Oltean,
Jakub Kicinski
On 10/29/2020 9:09 AM, Russell King wrote:
> DSA assumes that a bridge which has vlan filtering disabled is not
> vlan aware, and ignores all vlan configuration. However, the kernel
> software bridge code allows configuration in this state.
>
> This causes the kernel's idea of the bridge vlan state and the
> hardware state to disagree, so "bridge vlan show" indicates a correct
> configuration but the hardware lacks all configuration. Even worse,
> enabling vlan filtering on a DSA bridge immediately blocks all traffic
> which, given the output of "bridge vlan show", is very confusing.
>
> Allow the VLAN configuration to be updated on Marvell DSA bridges,
> otherwise we end up cutting all traffic when enabling vlan filtering.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup
2020-10-29 16:09 [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup Russell King
2020-10-29 16:28 ` Florian Fainelli
@ 2020-10-29 21:27 ` Vladimir Oltean
2020-10-30 21:31 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2020-10-29 21:27 UTC (permalink / raw)
To: Russell King
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, netdev,
Vivien Didelot, Florian Fainelli, Jakub Kicinski
On Thu, Oct 29, 2020 at 04:09:03PM +0000, Russell King wrote:
> DSA assumes that a bridge which has vlan filtering disabled is not
> vlan aware, and ignores all vlan configuration. However, the kernel
> software bridge code allows configuration in this state.
>
> This causes the kernel's idea of the bridge vlan state and the
> hardware state to disagree, so "bridge vlan show" indicates a correct
> configuration but the hardware lacks all configuration. Even worse,
> enabling vlan filtering on a DSA bridge immediately blocks all traffic
> which, given the output of "bridge vlan show", is very confusing.
>
> Allow the VLAN configuration to be updated on Marvell DSA bridges,
> otherwise we end up cutting all traffic when enabling vlan filtering.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
Tested-by: Vladimir Oltean <olteanv@gmail.com>
> This is the revised version of the patch that has been waiting a long
> time to fix this issue on the Marvell DSA switches.
>
> drivers/net/dsa/mv88e6xxx/chip.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index bd297ae7cf9e..72340c17f099 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -2851,6 +2851,7 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
>
> chip->ds = ds;
> ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
> + ds->configure_vlan_while_not_filtering = true;
>
> mv88e6xxx_reg_lock(chip);
>
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup
2020-10-29 16:09 [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup Russell King
2020-10-29 16:28 ` Florian Fainelli
2020-10-29 21:27 ` Vladimir Oltean
@ 2020-10-30 21:31 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-10-30 21:31 UTC (permalink / raw)
To: Russell King
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, netdev,
Vivien Didelot, Florian Fainelli, Vladimir Oltean
On Thu, 29 Oct 2020 16:09:03 +0000 Russell King wrote:
> DSA assumes that a bridge which has vlan filtering disabled is not
> vlan aware, and ignores all vlan configuration. However, the kernel
> software bridge code allows configuration in this state.
>
> This causes the kernel's idea of the bridge vlan state and the
> hardware state to disagree, so "bridge vlan show" indicates a correct
> configuration but the hardware lacks all configuration. Even worse,
> enabling vlan filtering on a DSA bridge immediately blocks all traffic
> which, given the output of "bridge vlan show", is very confusing.
>
> Allow the VLAN configuration to be updated on Marvell DSA bridges,
> otherwise we end up cutting all traffic when enabling vlan filtering.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-30 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-29 16:09 [PATCH net-next] net: dsa: mv88e6xxx: fix vlan setup Russell King
2020-10-29 16:28 ` Florian Fainelli
2020-10-29 21:27 ` Vladimir Oltean
2020-10-30 21:31 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).