linux/net/dsa
Jonas Gorski 762e7e174d net: dsa: tag_brcm: do not mark link local traffic as offloaded
Broadcom switches locally terminate link local traffic and do not
forward it, so we should not mark it as offloaded.

In some situations we still want/need to flood this traffic, e.g. if STP
is disabled, or it is explicitly enabled via the group_fwd_mask. But if
the skb is marked as offloaded, the kernel will assume this was already
done in hardware, and the packets never reach other bridge ports.

So ensure that link local traffic is never marked as offloaded, so that
the kernel can forward/flood these packets in software if needed.

Since the local termination in not configurable, check the destination
MAC, and never mark packets as offloaded if it is a link local ether
address.

While modern switches set the tag reason code to BRCM_EG_RC_PROT_TERM
for trapped link local traffic, they also set it for link local traffic
that is flooded (01:80:c2:00:00:10 to 01:80:c2:00:00:2f), so we cannot
use it and need to look at the destination address for them as well.

Fixes: 964dbf186e ("net: dsa: tag_brcm: add support for legacy tags")
Fixes: 0e62f543be ("net: dsa: Fix duplicate frames flooded by learning")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251109134635.243951-1-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-10 17:04:19 -08:00
..
Kconfig net: dsa: tag_brcm: add support for legacy FCS tags 2025-06-17 17:52:01 -07:00
Makefile net: dsa: vsc73xx: introduce tag 8021q for vsc73xx 2024-07-15 06:55:15 -07:00
conduit.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
conduit.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
devlink.c net: dsa: replace devlink resource registration calls by devl_ variants 2024-10-29 16:52:57 -07:00
devlink.h
dsa.c net: s/dev_close_many/netif_close_many/ 2025-07-18 17:27:47 -07:00
dsa.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
netlink.c net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT 2023-10-24 13:08:14 -07:00
netlink.h
port.c net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
port.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
stubs.c
switch.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
switch.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
tag.c net: dsa: provide a software untagging function on RX for VLAN-aware bridges 2024-08-16 09:59:32 +01:00
tag.h net: dsa: restore dsa_software_vlan_untag() ability to operate on VLAN-untagged traffic 2024-12-18 19:22:36 -08:00
tag_8021q.c net: dsa: avoid refcount warnings when ds->ops->tag_8021q_vlan_del() fails 2025-04-16 18:14:44 -07:00
tag_8021q.h net: dsa: tag_sja1105: refactor skb->dev assignment to dsa_tag_8021q_find_user() 2024-07-15 06:55:15 -07:00
tag_ar9331.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_brcm.c net: dsa: tag_brcm: do not mark link local traffic as offloaded 2025-11-10 17:04:19 -08:00
tag_dsa.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_gswip.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_hellcreek.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_ksz.c net: dsa: microchip: linearize skb for tail-tagging switches 2025-05-16 16:00:17 -07:00
tag_lan9303.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_mtk.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_none.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_ocelot.c net: mscc: ocelot: use ocelot_xmit_get_vlan_info() also for FDMA and register injection 2024-08-16 09:59:32 +01:00
tag_ocelot_8021q.c Kthreads affinity follow either of 4 existing different patterns: 2025-01-21 17:10:05 -08:00
tag_qca.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rtl4_a.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rtl8_4.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rzn1_a5psw.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_sja1105.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
tag_trailer.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_vsc73xx_8021q.c net: dsa: vsc73xx: introduce tag 8021q for vsc73xx 2024-07-15 06:55:15 -07:00
tag_xrs700x.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
user.c net: s/dev_close_many/netif_close_many/ 2025-07-18 17:27:47 -07:00
user.h net: dsa: update the unicast MAC address when changing conduit 2024-06-10 13:48:06 +01:00