netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] VLAN improvements for Ocelot switch
@ 2020-10-31 10:29 Vladimir Oltean
  2020-10-31 10:29 ` [PATCH net-next 1/7] net: mscc: ocelot: use the pvid of zero when bridged with vlan_filtering=0 Vladimir Oltean
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Vladimir Oltean @ 2020-10-31 10:29 UTC (permalink / raw)
  To: Microchip Linux Driver Support, Claudiu Manoil, Alexandre Belloni,
	Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel

The main reason why I started this work is that deleting the bridge mdb
entries fails when the bridge is deleted, as described here:
https://lore.kernel.org/netdev/20201015173355.564934-1-vladimir.oltean@nxp.com/

In short, that happens because the bridge mdb entries are added with a
vid of 1, but deletion is attempted with a vid of 0. So the deletion
code fails to find the mdb entries.

The solution is to make ocelot use a pvid of 0 when it is under a bridge
with vlan_filtering 0. When vlan_filtering is 1, the pvid of the bridge
is what is programmed into the hardware.

The patch series also uncovers more bugs and does some more cleanup, but
the above is the main idea behind it.

Vladimir Oltean (7):
  net: mscc: ocelot: use the pvid of zero when bridged with
    vlan_filtering=0
  net: mscc: ocelot: don't reset the pvid to 0 when deleting it
  net: mscc: ocelot: transform the pvid and native vlan values into a
    structure
  net: mscc: ocelot: add a "valid" boolean to struct ocelot_vlan
  net: mscc: ocelot: move the logic to drop 802.1p traffic to the pvid
    deletion
  net: mscc: ocelot: deny changing the native VLAN from the prepare
    phase
  net: dsa: felix: improve the workaround for multiple native VLANs on
    NPI port

 drivers/net/dsa/ocelot/felix.c         |  27 ++++-
 drivers/net/ethernet/mscc/ocelot.c     | 147 +++++++++++++------------
 drivers/net/ethernet/mscc/ocelot_net.c |  38 +++++--
 include/soc/mscc/ocelot.h              |  17 ++-
 4 files changed, 138 insertions(+), 91 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2020-11-03  1:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-31 10:29 [PATCH net-next 0/7] VLAN improvements for Ocelot switch Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 1/7] net: mscc: ocelot: use the pvid of zero when bridged with vlan_filtering=0 Vladimir Oltean
2020-11-02  8:47   ` Alexandre Belloni
2020-11-02 15:35     ` Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 2/7] net: mscc: ocelot: don't reset the pvid to 0 when deleting it Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 3/7] net: mscc: ocelot: transform the pvid and native vlan values into a structure Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 4/7] net: mscc: ocelot: add a "valid" boolean to struct ocelot_vlan Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 5/7] net: mscc: ocelot: move the logic to drop 802.1p traffic to the pvid deletion Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 6/7] net: mscc: ocelot: deny changing the native VLAN from the prepare phase Vladimir Oltean
2020-10-31 10:29 ` [PATCH net-next 7/7] net: dsa: felix: improve the workaround for multiple native VLANs on NPI port Vladimir Oltean
2020-11-03  1:10 ` [PATCH net-next 0/7] VLAN improvements for Ocelot switch 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).