net: dsa: sja1105: enforce FDB isolation
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 25 Feb 2022 09:22:24 +0000 (11:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Feb 2022 11:06:14 +0000 (11:06 +0000)
commit219827ef92f86460a6159c012636cae5e1e7a0e3
tree26abf05bdc1ae269db5efc86c622e20c010e5334
parent06b9cce42634a50f2840777a66553b02320db5ef
net: dsa: sja1105: enforce FDB isolation

For sja1105, to enforce FDB isolation simply means to turn on
Independent VLAN Learning unconditionally, and to remap VLAN-unaware FDB
and MDB entries towards the private VLAN allocated by tag_8021q for each
bridge.

Standalone ports each have their own standalone tag_8021q VLAN. No
learning happens in that VLAN due to:
- learning being disabled on standalone user ports
- learning being disabled on the CPU port (we use
  assisted_learning_on_cpu_port which only installs bridge FDBs)

VLAN-aware ports learn FDB entries with the bridge VLANs.

VLAN-unaware bridge ports learn with the tag_8021q VLAN for bridging.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c