linux-stable/drivers/net/dsa/mv88e6xxx
Vladimir Oltean ce5df6894a net: dsa: mv88e6xxx: map virtual bridges with forwarding offload in the PVT
The mv88e6xxx switches have the ability to receive FORWARD (data plane)
frames from the CPU port and route them according to the FDB. We can use
this to offload the forwarding process of packets sent by the software
bridge.

Because DSA supports bridge domain isolation between user ports, just
sending FORWARD frames is not enough, as they might leak the intended
broadcast domain of the bridge on behalf of which the packets are sent.

It should be noted that FORWARD frames are also (and typically) used to
forward data plane packets on DSA links in cross-chip topologies. The
FORWARD frame header contains the source port and switch ID, and
switches receiving this frame header forward the packet according to
their cross-chip port-based VLAN table (PVT).

To address the bridging domain isolation in the context of offloading
the forwarding on TX, the idea is that we can reuse the parts of the PVT
that don't have any physical switch mapped to them, one entry for each
software bridge. The switches will therefore think that behind their
upstream port lie many switches, all in fact backed up by software
bridges through tag_dsa.c, which constructs FORWARD packets with the
right switch ID corresponding to each bridge.

The mapping we use is absolutely trivial: DSA gives us a unique bridge
number, and we add the number of the physical switches in the DSA switch
tree to that, to obtain a unique virtual bridge device number to use in
the PVT.

Co-developed-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-23 16:32:37 +01:00
..
chip.c net: dsa: mv88e6xxx: map virtual bridges with forwarding offload in the PVT 2021-07-23 16:32:37 +01:00
chip.h net: dsa: mv88e6xxx: Export cross-chip PVT as devlink region 2021-04-21 10:25:09 -07:00
devlink.c net: dsa: mv88e6xxx: Export cross-chip PVT as devlink region 2021-04-21 10:25:09 -07:00
devlink.h net: dsa: mv88e6xxx: Implement devlink info get callback 2020-09-18 18:18:30 -07:00
global1.c net: dsa: mv88e6xxx: wrap .set_egress_port method 2021-03-17 14:44:18 -07:00
global1.h net: dsa: mv88e6xxx: add support for mv88e6393x family 2021-03-17 14:44:18 -07:00
global1_atu.c net: mv88e6xxx: convert comma to semicolon 2020-12-09 16:23:08 -08:00
global1_vtu.c net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_loadpurge() for the 6250 2021-01-26 17:58:28 -08:00
global2.c net: dsa: mv88e6xxx: Export cross-chip PVT as devlink region 2021-04-21 10:25:09 -07:00
global2.h net: dsa: mv88e6xxx: Export cross-chip PVT as devlink region 2021-04-21 10:25:09 -07:00
global2_avb.c net: dsa: mv88e6xxx: wait for AVB Busy bit 2019-08-11 21:27:15 -07:00
global2_scratch.c net: dsa: mv88e6xxx: fix up kerneldoc some more 2021-03-22 13:09:02 -07:00
hwtstamp.c net: dsa: no longer clone skb in core driver 2021-04-27 14:10:15 -07:00
hwtstamp.h net: dsa: no longer clone skb in core driver 2021-04-27 14:10:15 -07:00
Kconfig net: dsa: mv88e6xxx: NET_DSA_MV88E6XXX_PTP should depend on NET_DSA_MV88E6XXX 2021-07-15 10:04:43 -07:00
Makefile net: dsa: mv88e6xxx: Make global2 support mandatory 2021-01-27 19:28:16 -08:00
phy.c net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock 2019-06-23 11:11:11 -07:00
phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
port.c net: dsa: mv88e6xxx: Offload bridge learning flag 2021-03-18 16:24:06 -07:00
port.h net: dsa: mv88e6xxx: Offload bridge learning flag 2021-03-18 16:24:06 -07:00
port_hidden.c net: dsa: mv88e6xxx: update code operating on hidden registers 2019-08-27 21:42:16 -07:00
ptp.c mv88e6xxx: Reject requests to enable time stamping on both edges. 2019-11-15 12:48:32 -08:00
ptp.h net: dsa: mv88e6xxx: add PTP support for MV88E6250 family 2019-08-02 17:58:53 -07:00
serdes.c net: dsa: mv88e6xxx: enable SerDes RX stats for Topaz 2021-07-01 11:51:36 -07:00
serdes.h net: dsa: mv88e6xxx: add support for mv88e6393x family 2021-03-17 14:44:18 -07:00
smi.c net: dsa: mv88e6xxx: add delay in direct SMI wait 2019-08-11 21:27:15 -07:00
smi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00