diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-08-19 20:55:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-23 11:52:31 +0100 |
commit | f5e165e72b29d908214e554ef57f67790ba95934 (patch) | |
tree | e74566f4048f4548c985f2cc4b19b2e10cca4e1a /sound/i2c | |
parent | 1a6ef20b415220c8611679dcb9c31586641217fc (diff) | |
download | linux-f5e165e72b29d908214e554ef57f67790ba95934.tar.gz linux-f5e165e72b29d908214e554ef57f67790ba95934.tar.bz2 linux-f5e165e72b29d908214e554ef57f67790ba95934.zip |
net: dsa: track unique bridge numbers across all DSA switch trees
Right now, cross-tree bridging setups work somewhat by mistake.
In the case of cross-tree bridging with sja1105, all switch instances
need to agree upon a common VLAN ID for forwarding a packet that belongs
to a certain bridging domain.
With TX forwarding offload, the VLAN ID is the bridge VLAN for
VLAN-aware bridging, and the tag_8021q TX forwarding offload VID
(a VLAN which has non-zero VBID bits) for VLAN-unaware bridging.
The VBID for VLAN-unaware bridging is derived from the dp->bridge_num
value calculated by DSA independently for each switch tree.
If ports from one tree join one bridge, and ports from another tree join
another bridge, DSA will assign them the same bridge_num, even though
the bridges are different. If cross-tree bridging is supported, this
is an issue.
Modify DSA to calculate the bridge_num globally across all switch trees.
This has the implication for a driver that the dp->bridge_num value that
DSA will assign to its ports might not be contiguous, if there are
boards with multiple DSA drivers instantiated. Additionally, all
bridge_num values eat up towards each switch's
ds->num_fwd_offloading_bridges maximum, which is potentially unfortunate,
and can be seen as a limitation introduced by this patch. However, that
is the lesser evil for now.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/i2c')
0 files changed, 0 insertions, 0 deletions