]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dsa: tag_mxl862xx: set dsa_default_offload_fwd_mark()
authorDaniel Golle <daniel@makrotopia.org>
Wed, 1 Apr 2026 13:34:52 +0000 (14:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Apr 2026 01:30:33 +0000 (18:30 -0700)
The MxL862xx offloads bridge forwarding in hardware, so set
dsa_default_offload_fwd_mark() to avoid duplicate forwarding of
packets of (eg. flooded) frames arriving at the CPU port.

Link-local frames are directly trapped to the CPU port only, so don't
set dsa_default_offload_fwd_mark() on those.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/e1161c90894ddc519c57dc0224b3a0f6bfa1d2d6.1775049897.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/tag_mxl862xx.c

index 01f215868271861f0f1a78553220a4ed31131cf8..8daefeb8d49dfacf31a8d28da8f37ce8e4a8a322 100644 (file)
@@ -86,6 +86,9 @@ static struct sk_buff *mxl862_tag_rcv(struct sk_buff *skb,
                return NULL;
        }
 
+       if (likely(!is_link_local_ether_addr(eth_hdr(skb)->h_dest)))
+               dsa_default_offload_fwd_mark(skb);
+
        /* remove the MxL862xx special tag between the MAC addresses and the
         * current ethertype field.
         */