Skip to content

Commit c49379d

Browse files
committed
Merge branch 'net-dsa-vsc73xx-implement-vlan-operations'
Pawel Dembicki says: ==================== net: dsa: vsc73xx: Implement VLAN operations This patch series is a result of splitting a larger patch series [0], where some parts was merged before. The first patch implements port state configuration, which is required for bridge functionality. STP frames are not forwarded at this moment. BPDU frames are only forwarded from/to the PI/SI interface. For more information, see chapter 2.7.1 (CPU Forwarding) in the datasheet. Patches 2, 7-9 and 11 provide a basic implementation of tag_8021q functionality with QinQ support, without VLAN filtering in the bridge and simple VLAN awareness in VLAN filtering mode. Patches 3-6 came from Vladimir Oltean. They prepare for making tag8021q more common. VSC73XX uses very similar tag recognition, and some code from tag_sja1105 could be moved to tag_8021q for common use. Patch 10 is preparation for use tag_8021q bridge functions as generic implementation of the 'ds->ops->port_bridge_*()'. Patch 12 is required to avoid problem with learning on standalone ports. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=841034&state=%2A&archive=both ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents a8ea8d5 + 259a706 commit c49379d

File tree

13 files changed

+934
-98
lines changed

13 files changed

+934
-98
lines changed

drivers/net/dsa/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ config NET_DSA_SMSC_LAN9303_MDIO
127127

128128
config NET_DSA_VITESSE_VSC73XX
129129
tristate
130-
select NET_DSA_TAG_NONE
130+
select NET_DSA_TAG_VSC73XX_8021Q
131131
select FIXED_PHY
132132
select VITESSE_PHY
133133
select GPIOLIB

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,14 +2133,13 @@ static int sja1105_bridge_join(struct dsa_switch *ds, int port,
21332133
if (rc)
21342134
return rc;
21352135

2136-
rc = dsa_tag_8021q_bridge_join(ds, port, bridge);
2136+
rc = dsa_tag_8021q_bridge_join(ds, port, bridge, tx_fwd_offload,
2137+
extack);
21372138
if (rc) {
21382139
sja1105_bridge_member(ds, port, bridge, false);
21392140
return rc;
21402141
}
21412142

2142-
*tx_fwd_offload = true;
2143-
21442143
return 0;
21452144
}
21462145

@@ -3167,8 +3166,7 @@ static int sja1105_setup(struct dsa_switch *ds)
31673166
ds->vlan_filtering_is_global = true;
31683167
ds->untag_bridge_pvid = true;
31693168
ds->fdb_isolation = true;
3170-
/* tag_8021q has 3 bits for the VBID, and the value 0 is reserved */
3171-
ds->max_num_bridges = 7;
3169+
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
31723170

31733171
/* Advertise the 8 egress queues */
31743172
ds->num_tx_queues = SJA1105_NUM_TC;

0 commit comments

Comments
 (0)