* [PATCH net] net: dsa: tag_brcm: fix link-local detection with a prepended tag
@ 2026-11-18 18:40 Florian Fainelli
2026-11-18 18:43 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2026-11-18 18:40 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, open list
brcm_tag_rcv_ll() checks eth_hdr(skb)->h_dest to avoid marking link-local
frames as forwarded by the switch. With a prepended tag, eth_type_trans()
sets the MAC header at the start of the tag, so the address checked is the
tag plus the first two bytes of the real destination address. Link-local
frames such as BPDUs, LLDP or EAPOL are then not recognized and get
skb->offload_fwd_mark set, which keeps the bridge from forwarding them in
software to the other ports of the switch when it is configured to do so.
Read the destination address after the tag instead when the tag is
prepended. Tags embedded after the source address are not affected.
Fixes: 762e7e174da9 ("net: dsa: tag_brcm: do not mark link local traffic as offloaded")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
This change was a result of a Sashiko review on this patch series:
https://lore.kernel.org/all/20261116222519.1416501-1-florian.fainelli@broadcom.com/
net/dsa/tag_brcm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index b7c49822ca88..b58669c92147 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -149,6 +149,7 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
unsigned int offset)
{
int source_port;
+ const u8 *dest;
u8 *brcm_tag;
if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN))) {
@@ -184,7 +185,11 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
/* Remove Broadcom tag and update checksum */
skb_pull_rcsum(skb, BRCM_TAG_LEN);
- if (likely(!is_link_local_ether_addr(eth_hdr(skb)->h_dest)))
+ /* With a prepended tag, the MAC header set by eth_type_trans() starts
+ * at the tag, and the destination address follows it.
+ */
+ dest = offset == ETH_HLEN ? brcm_tag + BRCM_TAG_LEN : eth_hdr(skb)->h_dest;
+ if (likely(!is_link_local_ether_addr(dest)))
dsa_default_offload_fwd_mark(skb);
return skb;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: dsa: tag_brcm: fix link-local detection with a prepended tag
2026-11-18 18:40 [PATCH net] net: dsa: tag_brcm: fix link-local detection with a prepended tag Florian Fainelli
@ 2026-11-18 18:43 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-18 18:43 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-18 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 18:40 [PATCH net] net: dsa: tag_brcm: fix link-local detection with a prepended tag Florian Fainelli
2026-11-18 18:43 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox