netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: dsa: add cross-chip VLAN support
@ 2017-06-06 20:56 Vivien Didelot
  2017-06-06 20:56 ` [PATCH net-next 1/5] net: dsa: mv88e6xxx: define membership on VLAN add Vivien Didelot
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot

The current code in DSA does not support cross-chip VLAN. This means
that in a multi-chip environment such as this one (similar to ZII Rev B)

         [CPU].................... (mdio)
    (eth0) |   :       :          :
          _|_____    _______    _______
         [__sw0__]--[__sw1__]--[__sw2__]
          |  |  |    |  |  |    |  |  |
          v  v  v    v  v  v    v  v  v
          p1 p2 p3   p4 p5 p6   p7 p8 p9 

adding a VLAN to p9 won't be enough to reach the CPU, until at least one
port of sw0 and sw1 join the VLAN as well and become aware of the VID.

This patchset makes the DSA core program the VLAN on the CPU and DSA
links itself, which brings seamlessly cross-chip VLAN support to DSA.

With this series applied*, the hardware VLAN tables of a 3-switch setup
look like this after adding a VLAN to only one port of the end switch:

    # cat /sys/class/net/br0/bridge/default_pvid 
    42
    # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu
    # ip link set up master br0 dev lan6
    # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu
     VID  FID  SID  0  1  2  3  4  5  6
      42    1    0  x  x  x  x  x  =  =
     VID  FID  SID  0  1  2  3  4  5  6
      42    1    0  x  x  x  x  x  =  =
     VID  FID  SID  0  1  2  3  4  5  6  7  8  9
      42    1    0  u  x  x  x  x  x  x  x  x  =

('x' is excluded, 'u' is untagged, '=' is unmodified DSA and CPU ports.)

Completely removing a VLAN entry (which is currently the responsibility
of drivers anyway) is not supported yet since it requires some caching.

(*) the output is shown from this out-of-tree debugfs patch:
https://github.com/vivien/linux/commit/7b61a684b9d6b6a499135a587c7f62a1fddceb8b.patch

Vivien Didelot (5):
  net: dsa: mv88e6xxx: define membership on VLAN add
  net: dsa: check VLAN capability of every switch
  net: dsa: add CPU and DSA ports as VLAN members
  net: dsa: mv88e6xxx: exclude all ports in new VLAN
  net: dsa: mv88e6xxx: do not purge a VTU entry

 drivers/net/dsa/mv88e6xxx/chip.c | 38 +++++++++++++++-----------------------
 net/dsa/switch.c                 | 30 ++++++++++++++++++++----------
 2 files changed, 35 insertions(+), 33 deletions(-)

-- 
2.13.0

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

end of thread, other threads:[~2017-06-07 20:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06 20:56 [PATCH net-next 0/5] net: dsa: add cross-chip VLAN support Vivien Didelot
2017-06-06 20:56 ` [PATCH net-next 1/5] net: dsa: mv88e6xxx: define membership on VLAN add Vivien Didelot
2017-06-07 19:31   ` Florian Fainelli
2017-06-06 20:56 ` [PATCH net-next 2/5] net: dsa: check VLAN capability of every switch Vivien Didelot
2017-06-07 19:39   ` Florian Fainelli
2017-06-07 20:03     ` Vivien Didelot
2017-06-06 20:56 ` [PATCH net-next 3/5] net: dsa: add CPU and DSA ports as VLAN members Vivien Didelot
2017-06-07 19:00   ` David Miller
2017-06-07 19:38   ` Florian Fainelli
2017-06-06 20:56 ` [PATCH net-next 4/5] net: dsa: mv88e6xxx: exclude all ports in new VLAN Vivien Didelot
2017-06-07 19:34   ` Florian Fainelli
2017-06-06 20:56 ` [PATCH net-next 5/5] net: dsa: mv88e6xxx: do not purge a VTU entry Vivien Didelot
2017-06-07 19:37   ` Florian Fainelli
2017-06-07 19:59     ` Vivien Didelot

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