netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/13] Improvements to DSA core VLAN manipulation
@ 2019-04-28 18:45 Vladimir Oltean
  2019-04-28 18:45 ` [PATCH net-next 01/13] net: dsa: Fix pharse -> phase typo Vladimir Oltean
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Vladimir Oltean @ 2019-04-28 18:45 UTC (permalink / raw)
  To: f.fainelli, vivien.didelot, andrew, davem; +Cc: netdev, Vladimir Oltean

In preparation of submitting the NXP SJA1105 driver, the Broadcom b53
and Mediatek mt7530 drivers have been found to apply some VLAN
workarounds that are needed in the new driver as well.

Therefore this patchset is mostly simply promoting the DSA driver
workarounds for VLAN to the generic code.

The b53 driver was applying a few workarounds in order to convince DSA
that its vlan_filtering setting is not really per-port. This is now
simply set by the driver via a DSA variable at probe time. The sja1105
driver will be a second user of this.

The mt7530 was also keeping track of when the .port_vlan_filtering
callback was being called. Remove the kept state from this driver
and simplify dealing with vlan_filtering in the generic case.

TODO:

Find the best way to deal generically with the situation described below
(discussion at https://lkml.org/lkml/2019/4/16/1355):

> > +Segregating the switch ports in multiple bridges is supported (e.g. 2 + 2), but
> > +all bridges should have the same level of VLAN awareness (either both have
> > +``vlan_filtering`` 0, or both 1). Also an inevitable limitation of the fact
> > +that VLAN awareness is global at the switch level is that once a bridge with
> > +``vlan_filtering`` enslaves at least one switch port, the other un-bridged
> > +ports are no longer available for standalone traffic termination.
> 
> That is quite a limitation that I don't think I had fully grasped until
> reading your different patches. Since enslaving ports into a bridge
> comes after the network device was already made available for use, maybe
> you should force the carrier down or something along those lines as soon
> as a port is enslaved into a bridge with vlan_filtering=1 to make this
> more predictable for the user?

Vladimir Oltean (13):
  net: dsa: Fix pharse -> phase typo
  net: dsa: Store vlan_filtering as a property of dsa_port
  net: dsa: Be aware of switches where VLAN filtering is a global
    setting
  net: dsa: b53: Let DSA handle mismatched VLAN filtering settings
  net: dsa: Unset vlan_filtering when ports leave the bridge
  net: dsa: mt7530: Let DSA handle the unsetting of vlan_filtering
  net: dsa: Keep the vlan_filtering setting in dsa_switch if it's global
  net: dsa: Add helper function to retrieve VLAN awareness setting
  net: dsa: mt7530: Use the DSA vlan_filtering helper function
  net: dsa: Skip calling .port_vlan_filtering on no change
  net: dsa: b53: Let DSA call .port_vlan_filtering only when necessary
  net: dsa: b53: Use vlan_filtering property from dsa_switch
  net: dsa: Add more convenient functions for installing port VLANs

 drivers/net/dsa/b53/b53_common.c | 34 +++++--------
 drivers/net/dsa/b53/b53_priv.h   |  1 -
 drivers/net/dsa/mt7530.c         | 20 +++-----
 drivers/net/dsa/mt7530.h         |  1 -
 include/net/dsa.h                | 21 ++++++++
 net/dsa/dsa_priv.h               |  2 +
 net/dsa/port.c                   | 85 ++++++++++++++++++++++++++++++--
 net/dsa/slave.c                  | 24 ++-------
 net/dsa/switch.c                 | 31 +++++++++++-
 9 files changed, 156 insertions(+), 63 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-05-01  3:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-28 18:45 [PATCH net-next 00/13] Improvements to DSA core VLAN manipulation Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 01/13] net: dsa: Fix pharse -> phase typo Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 02/13] net: dsa: Store vlan_filtering as a property of dsa_port Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 03/13] net: dsa: Be aware of switches where VLAN filtering is a global setting Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 04/13] net: dsa: b53: Let DSA handle mismatched VLAN filtering settings Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 05/13] net: dsa: Unset vlan_filtering when ports leave the bridge Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 06/13] net: dsa: mt7530: Let DSA handle the unsetting of vlan_filtering Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 07/13] net: dsa: Keep the vlan_filtering setting in dsa_switch if it's global Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 08/13] net: dsa: Add helper function to retrieve VLAN awareness setting Vladimir Oltean
2019-04-29 21:55   ` Andrew Lunn
2019-04-28 18:45 ` [PATCH net-next 09/13] net: dsa: mt7530: Use the DSA vlan_filtering helper function Vladimir Oltean
2019-04-28 18:45 ` [PATCH net-next 10/13] net: dsa: Skip calling .port_vlan_filtering on no change Vladimir Oltean
2019-04-29 21:57   ` Andrew Lunn
2019-04-28 18:45 ` [PATCH net-next 11/13] net: dsa: b53: Let DSA call .port_vlan_filtering only when necessary Vladimir Oltean
2019-04-29 21:57   ` Andrew Lunn
2019-04-28 18:45 ` [PATCH net-next 12/13] net: dsa: b53: Use vlan_filtering property from dsa_switch Vladimir Oltean
2019-04-29 21:58   ` Andrew Lunn
2019-04-28 18:45 ` [PATCH net-next 13/13] net: dsa: Add more convenient functions for installing port VLANs Vladimir Oltean
2019-05-01  3:05 ` [PATCH net-next 00/13] Improvements to DSA core VLAN manipulation David Miller

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).