1
0
Fork 0
alistair23-linux/net/dsa
DENG Qingfang 557045f771 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:20:43 +02:00
..
Kconfig net: dsa: microchip: remove NET_DSA_TAG_KSZ_COMMON 2019-09-12 11:36:12 +01:00
Makefile net: dsa: microchip: remove NET_DSA_TAG_KSZ_COMMON 2019-09-12 11:36:12 +01:00
dsa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dsa2.c net: dsa: Do not make user port errors fatal 2020-05-20 08:20:03 +02:00
dsa_priv.h net: dsa: fix phylink_start()/phylink_stop() calls 2020-03-18 07:17:39 +01:00
master.c net: dsa: Do not leave DSA master with NULL netdev_ops 2020-05-14 07:58:20 +02:00
port.c net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed 2020-03-18 07:17:47 +01:00
slave.c net: dsa: fix phylink_start()/phylink_stop() calls 2020-03-18 07:17:39 +01:00
switch.c net: dsa: program VLAN on CPU port from slave 2019-08-27 20:17:28 -07:00
tag_8021q.c net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop 2020-04-01 11:01:34 +02:00
tag_brcm.c net: dsa: Fix duplicate frames flooded by learning 2020-04-01 11:01:33 +02:00
tag_dsa.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_edsa.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_gswip.c net: dsa: tag_gswip: fix typo in tagger name 2020-01-23 08:22:52 +01:00
tag_ksz.c net: dsa: ksz: Add KSZ8795 tag code 2019-07-30 15:12:50 -07:00
tag_lan9303.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_mtk.c net: dsa: mt7530: fix roaming from DSA user ports 2020-06-03 08:20:43 +02:00
tag_qca.c net: dsa: tag_qca: Make sure there is headroom for tag 2020-02-24 08:36:22 +01:00
tag_sja1105.c net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop 2020-04-01 11:01:34 +02:00
tag_trailer.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00