Re: [PATCH net-next 1/5] net: dsa: tag_ksz: do not mark trapped link-local frames as forwarded

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-26 14:47:41
Also in
bridge
Reply to
Oleksij Rempel, 2026-11-26
quoted hunk ↗ jump to hunk
+	/* The switch driver reports which link-local groups the switch sends
+	 * to the CPU only. The switch did not forward frames to these groups,
+	 * so do not mark them, and let the bridge apply its own rules
+	 * (group_fwd_mask, STP state).
+	 */
+	if (!ksz_link_local_trapped(skb->dev, eth_hdr(skb)->h_dest))
+		dsa_default_offload_fwd_mark(skb);
There is a bit of a common pattern in tag drivers:

        if (likely(!is_link_local_ether_addr(eth_hdr(skb)->h_dest)))
                dsa_default_offload_fwd_mark(skb);

Your variant is more specific, but does it need to be?

Should we consider adding a variant of dsa_default_offload_fwd_mark()
which combines this into one? And then change the tag drivers to use
it?

	Andrew
Thread (14 messages) 14 messages, 4 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help