Skip to content

Commit 968d7cb

Browse files
committed
Merge branch 'mv88e6xxx-hw-vlan'
Vivien Didelot says: ==================== net: dsa: mv88e6xxx: add hardware VLAN support This patchset brings support to access hardware VLAN entries in DSA and mv88e6xxx, through switchdev VLAN objects. In the following example, ports swp[0-2] belong to bridge br0, and ports swp[3-4] belong to bridge br1. Here's an example of what can be achieved after this patchset: # bridge vlan add dev swp1 vid 100 master # bridge vlan add dev swp2 vid 100 master # bridge vlan add dev swp3 vid 100 master # bridge vlan add dev swp4 vid 100 master # bridge vlan del dev swp1 vid 100 master The above commands correctly programmed hardware VLAN 100 for port swp2, while ports swp3 and swp4 use software VLAN 100, as shown with: # bridge vlan port vlan ids swp0 None swp0 swp1 None swp1 swp2 100 swp2 100 swp3 100 swp3 swp4 100 swp4 br0 None br1 None Assuming that port 5 is the CPU port, the hardware VLAN table would contain the following data: VID FID SID 0 1 2 3 4 5 6 100 8 0 x x t x x t x Where 'x' means excluded, and 't' means tagged. Also, adding an FDB entry to VLAN 100 for port swp2 like this: # bridge fdb add 3c:97:0e:11:6e:30 dev swp2 vlan 100 Would result in the following example output: # bridge fdb # 01:00:5e:00:00:01 dev eth0 self permanent # 01:00:5e:00:00:01 dev eth1 self permanent # 00:50:d2:10:78:15 dev swp0 master br0 permanent # 00:50:d2:10:78:15 dev swp2 vlan 100 master br0 permanent # 3c:97:0e:11:6e:30 dev swp2 vlan 100 self static # 00:50:d2:10:78:15 dev swp3 master br1 permanent # 00:50:d2:10:78:15 dev swp3 vlan 100 master br1 permanent And the Address Translation Unit would contain: DB T/P Vec State Addr 008 Port 004 e 3c:97:0e:11:6e:30 ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 35103d1 + 8efdda4 commit 968d7cb

File tree

5 files changed

+720
-9
lines changed

5 files changed

+720
-9
lines changed

drivers/net/dsa/mv88e6352.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,11 @@ struct dsa_switch_driver mv88e6352_switch_driver = {
343343
.port_join_bridge = mv88e6xxx_join_bridge,
344344
.port_leave_bridge = mv88e6xxx_leave_bridge,
345345
.port_stp_update = mv88e6xxx_port_stp_update,
346+
.port_pvid_get = mv88e6xxx_port_pvid_get,
347+
.port_pvid_set = mv88e6xxx_port_pvid_set,
348+
.port_vlan_add = mv88e6xxx_port_vlan_add,
349+
.port_vlan_del = mv88e6xxx_port_vlan_del,
350+
.vlan_getnext = mv88e6xxx_vlan_getnext,
346351
.port_fdb_add = mv88e6xxx_port_fdb_add,
347352
.port_fdb_del = mv88e6xxx_port_fdb_del,
348353
.port_fdb_getnext = mv88e6xxx_port_fdb_getnext,

0 commit comments

Comments
 (0)