linux/drivers/net
Vladimir Oltean 91495f21fc net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging
For VLAN-unaware bridging, tag_8021q uses something perhaps a bit too
tied with the sja1105 switch: each port uses the same pvid which is also
used for standalone operation (a unique one from which the source port
and device ID can be retrieved when packets from that port are forwarded
to the CPU). Since each port has a unique pvid when performing
autonomous forwarding, the switch must be configured for Shared VLAN
Learning (SVL) such that the VLAN ID itself is ignored when performing
FDB lookups. Without SVL, packets would always be flooded, since FDB
lookup in the source port's VLAN would never find any entry.

First of all, to make tag_8021q more palatable to switches which might
not support Shared VLAN Learning, let's just use a common VLAN for all
ports that are under the same bridge.

Secondly, using Shared VLAN Learning means that FDB isolation can never
be enforced. But if all ports under the same VLAN-unaware bridge share
the same VLAN ID, it can.

The disadvantage is that the CPU port can no longer perform precise
source port identification for these packets. But at least we have a
mechanism which has proven to be adequate for that situation: imprecise
RX (dsa_find_designated_bridge_port_by_vid), which is what we use for
termination on VLAN-aware bridges.

The VLAN ID that VLAN-unaware bridges will use with tag_8021q is the
same one as we were previously using for imprecise TX (bridge TX
forwarding offload). It is already allocated, it is just a matter of
using it.

Note that because now all ports under the same bridge share the same
VLAN, the complexity of performing a tag_8021q bridge join decreases
dramatically. We no longer have to install the RX VLAN of a newly
joining port into the port membership of the existing bridge ports.
The newly joining port just becomes a member of the VLAN corresponding
to that bridge, and the other ports are already members of it from when
they joined the bridge themselves. So forwarding works properly.

This means that we can unhook dsa_tag_8021q_bridge_{join,leave} from the
cross-chip notifier level dsa_switch_bridge_{join,leave}. We can put
these calls directly into the sja1105 driver.

With this new mode of operation, a port controlled by tag_8021q can have
two pvids whereas before it could only have one. The pvid for standalone
operation is different from the pvid used for VLAN-unaware bridging.
This is done, again, so that FDB isolation can be enforced.
Let tag_8021q manage this by deleting the standalone pvid when a port
joins a bridge, and restoring it when it leaves it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-02-27 11:06:13 +00:00
..
appletalk
arcnet
bonding bonding: add new option ns_ip6_target 2022-02-21 12:13:45 +00:00
caif
can can: mcp251xfd: mcp251xfd_priv: introduce macros specifying the number of supported TEF/RX/TX rings 2022-02-24 08:47:00 +01:00
dsa net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging 2022-02-27 11:06:13 +00:00
ethernet net/fungible: Kconfig, Makefiles, and MAINTAINERS 2022-02-27 10:51:23 +00:00
fddi
fjes drivers: net: Replace acpi_bus_get_device() 2022-02-02 08:05:06 -08:00
hamradio drivers: hamradio: 6pack: fix UAF bug caused by mod_timer() 2022-02-18 10:58:17 +00:00
hippi
hyperv Netvsc: Call hv_unmap_memory() in the netvsc_device_remove() 2022-02-09 11:54:05 +00:00
ieee802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
ipa net: ipa: determine replenish doorbell differently 2022-02-04 10:16:08 +00:00
ipvlan
mctp mctp i2c: Fix hard head TX bounds length check 2022-02-25 22:23:33 -08:00
mdio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-24 17:54:25 -08:00
netdevsim ipv6: fix data-race in fib6_info_hw_flags_set / fib6_purge_rt 2022-02-17 09:48:24 -08:00
pcs
phy net: phy: phylink: fix DSA mac_select_pcs() introduction 2022-02-22 16:57:08 -08:00
plip
ppp
slip
team teaming: deliver link-local packets with the link they arrive on 2022-02-18 11:40:52 +00:00
usb net: asix: remove code duplicates in asix_mdio_read/write and asix_mdio_read/write_nopm 2022-02-24 21:21:30 -08:00
vmxnet3
wan
wireguard
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
wwan net: wwan: iosm: drop debugfs dev reference 2022-02-14 14:09:59 +00:00
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-02-24 08:58:37 -08:00
amt.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
bareudp.c
dummy.c
eql.c
geneve.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
gtp.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macsec.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macvlan.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macvtap.c
Makefile
mdio.c
mhi_net.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
rionet.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
sb1000.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
virtio_net.c virtio_net: Fix code indent error 2022-02-15 14:27:17 +00:00
vrf.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
vsockmon.c
vxlan.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
xen-netfront.c