linux-uconsole/net/dsa
DENG Qingfang 52db4beed4 net: dsa: mt7530: fix roaming from DSA user ports
[ Upstream commit 5e5502e012 ]

When a client moves from a DSA user port to a software port in a bridge,
it cannot reach any other clients that connected to the DSA user ports.
That is because SA learning on the CPU port is disabled, so the switch
ignores the client's frames from the CPU port and still thinks it is at
the user port.

Fix it by enabling SA learning on the CPU port.

To prevent the switch from learning from flooding frames from the CPU
port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames,
and let the switch flood them instead of trapping to the CPU port.
Multicast frames still need to be trapped to the CPU port for snooping,
so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames
to disable SA learning.

Fixes: b8f126a8d5 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-03 08:19:03 +02:00
..
dsa.c net: dsa: Fix error cleanup path in dsa_init_module 2019-05-16 19:41:29 +02:00
dsa2.c net: dsa: Do not make user port errors fatal 2020-05-20 08:18:32 +02:00
dsa_priv.h net: dsa: Plug in PHYLINK support 2018-05-11 12:03:06 -04:00
Kconfig net: dsa: Add PHYLINK switch operations 2018-05-11 12:03:05 -04:00
legacy.c net: dsa: Fix dsa_is_user_port() test inversion 2018-03-12 21:04:55 -04:00
Makefile net: dsa: Allow compiling out legacy support 2017-12-07 14:14:54 -05:00
master.c net: dsa: Fix lockdep false positive splat 2019-02-12 19:47:21 +01:00
port.c net: dsa: fix unintended change of bridge interface STP state 2020-01-27 14:50:26 +01:00
slave.c net: dsa: Avoid null pointer when failing to connect to PHY 2020-01-27 14:50:34 +01:00
switch.c net: dsa: Check existence of .port_mdb_add callback before calling it 2019-08-25 10:48:03 +02:00
tag_brcm.c net: dsa: Fix duplicate frames flooded by learning 2020-04-02 15:28:11 +02:00
tag_dsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_edsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_ksz.c net: dsa: rename dsa_master_get_slave 2017-10-18 12:24:33 +01:00
tag_lan9303.c net: dsa: lan9303: calculate offload_fwd_mark from tag 2017-11-14 21:47:48 +09:00
tag_mtk.c net: dsa: mt7530: fix roaming from DSA user ports 2020-06-03 08:19:03 +02:00
tag_qca.c net: dsa: tag_qca: Make sure there is headroom for tag 2020-02-24 08:34:34 +01:00
tag_trailer.c net: dsa: add error handling for pskb_trim_rcsum 2018-06-11 14:19:38 -07:00