Skip to content

Commit ec1606c

Browse files
committed
Merge branch 'mv88e6xxx-vlan-filtering'
Vivien Didelot says: ==================== net: dsa: mv88e6xxx: implement VLAN filtering This patchset fixes hardware bridging for non 802.1Q aware systems. The mv88e6xxx DSA driver currently depends on CONFIG_VLAN_8021Q and CONFIG_BRIDGE_VLAN_FILTERING enabled for correct bridging between switch ports. Patch 1/9 adds support for the VLAN filtering switchdev attribute in DSA. Patchs 2/9 and 3/9 add helper functions for the following patches. Patchs 4/9 to 6/9 assign dynamic address databases to VLANs, ports, and bridge groups (the lowest available FID is cleared and assigned), and thus restore support for per-port FDB operations. Patchs 7/9 to 9/9 refine ports isolation and setup 802.1Q on user demand. With this patchset, ports get correctly bridged and the driver behaves as expected, with or without 802.1Q support. With CONFIG_VLAN_8021Q enabled, setting a default PVID to the bridge correctly propagates the corresponding VLAN, in addition to the hardware bridging: # echo 42 > /sys/class/net/<bridge>/bridge/default_pvid But considering CONFIG_BRIDGE_VLAN_FILTERING enabled, the hardware VLAN filtering is enabled on all bridge members only when the user requests it: # echo 1 > /sys/class/net/<bridge>/bridge/vlan_filtering ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 7f66ee4 + 214cdb9 commit ec1606c

File tree

6 files changed

+370
-102
lines changed

6 files changed

+370
-102
lines changed

drivers/net/dsa/mv88e6171.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
106106
.port_join_bridge = mv88e6xxx_port_bridge_join,
107107
.port_leave_bridge = mv88e6xxx_port_bridge_leave,
108108
.port_stp_update = mv88e6xxx_port_stp_update,
109+
.port_vlan_filtering = mv88e6xxx_port_vlan_filtering,
109110
.port_vlan_prepare = mv88e6xxx_port_vlan_prepare,
110111
.port_vlan_add = mv88e6xxx_port_vlan_add,
111112
.port_vlan_del = mv88e6xxx_port_vlan_del,

drivers/net/dsa/mv88e6352.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ struct dsa_switch_driver mv88e6352_switch_driver = {
327327
.port_join_bridge = mv88e6xxx_port_bridge_join,
328328
.port_leave_bridge = mv88e6xxx_port_bridge_leave,
329329
.port_stp_update = mv88e6xxx_port_stp_update,
330+
.port_vlan_filtering = mv88e6xxx_port_vlan_filtering,
330331
.port_vlan_prepare = mv88e6xxx_port_vlan_prepare,
331332
.port_vlan_add = mv88e6xxx_port_vlan_add,
332333
.port_vlan_del = mv88e6xxx_port_vlan_del,

0 commit comments

Comments
 (0)