Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1177091

[PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table Unit

From Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Newsgroups linux.kernel
Subject [PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table Unit
Date 2015-07-06 04:20 +0200
Message-ID <pJ4aJ-2gZ-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi all,

This patchset brings full support for hardware VLANs in DSA, and the Marvell
88E6xxx compatible switch chips.

The first patch adds the VTU operations to the mv88e6xxx code, as well as a
"vtu" debugfs file to read and modify the hardware VLAN table.

The second patch adds the glue between DSA and the switchdev VLAN objects.

The third patch finally implements the necessary functions in the mv88e6xxx
code to interact with the hardware VLAN through switchdev, from userspace
commands such as "bridge vlan".

Below is an example of what can be done with this patchset.

    "VID 550: 1t 3u"
    "VID 1000: 2t"
    "VID 1200: 2t 4t"

The VLAN setup above can be achieved with the following bridge commands:

    bridge vlan add vid 550 dev swp1 master
    bridge vlan add vid 550 dev swp3 master untagged pvid
    bridge vlan add vid 1000 dev swp2 master
    bridge vlan add vid 1200 dev swp2 master
    bridge vlan add vid 1200 dev swp4 master

Removing the port 1 from VLAN 550 is done with:

    bridge vlan del vid 550 dev swp1

The bridge command would output the following setup:

    # bridge vlan
    port	vlan ids
    swp0	None
    swp0
    swp1	None
    swp1
    swp2	1000
		1200

    swp2	1000
		1200

    swp3	550 PVID Egress Untagged

    swp3	550 PVID Egress Untagged

    swp4	1200

    swp4	1200

    br0	None

Assuming that swp5 is the CPU port, the "vtu" debugfs file would show:

    # cat /sys/kernel/debug/dsa0/vtu
    VID  FID  SID  0  1  2  3  4  5  6
    550  550  0    x  x  x  u  x  t  x
    1000 1000 0    x  x  t  x  x  t  x
    1200 1200 0    x  x  t  x  t  t  x

Cheers,
  -v


Vivien Didelot (3):
  net: dsa: mv88e6xxx: add debugfs interface for VTU
  net: dsa: add support for switchdev VLAN objects
  net: dsa: mv88e6xxx: add switchdev VLAN operations

 drivers/net/dsa/mv88e6123_61_65.c |   3 +
 drivers/net/dsa/mv88e6131.c       |   3 +
 drivers/net/dsa/mv88e6171.c       |   3 +
 drivers/net/dsa/mv88e6352.c       |   3 +
 drivers/net/dsa/mv88e6xxx.c       | 463 ++++++++++++++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx.h       |  29 +++
 include/net/dsa.h                 |   9 +
 net/dsa/dsa_priv.h                |   6 +
 net/dsa/slave.c                   | 137 +++++++++++
 9 files changed, 656 insertions(+)

-- 
2.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table Unit Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-06 04:20 +0200
  [PATCH v3 2/3] net: dsa: add support for switchdev VLAN objects Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-06 04:20 +0200
  [PATCH v3 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-06 04:20 +0200
    Re: [PATCH v3 1/3] net: dsa: mv88e6xxx: add debugfs interface for  VTU Guenter Roeck <linux@roeck-us.net> - 2015-07-07 18:20 +0200
    Re: [PATCH v3 1/3] net: dsa: mv88e6xxx: add debugfs interface for  VTU Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-07 18:20 +0200
    Re: [PATCH v3 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU Andrew Lunn <andrew@lunn.ch> - 2015-07-07 18:20 +0200
  [PATCH v3 3/3] net: dsa: mv88e6xxx: add switchdev VLAN operations Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-06 04:20 +0200
  Re: [PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table  Unit Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-07-07 18:20 +0200
    Re: [PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table  Unit Andrew Lunn <andrew@lunn.ch> - 2015-07-07 18:30 +0200

csiph-web