Re: [PATCH net-next 1/2] dsa: tag_mxl862xx: set dsa_default_offload_fwd_mark()

From: Daniel Golle

Date: Sun Mar 08 2026 - 11:22:45 EST


On Sat, Mar 07, 2026 at 10:57:56AM +0100, Jonas Gorski wrote:
> Hi,
>
> On 07/03/2026 04:30, Daniel Golle wrote:
> > The MxL862xx offloads forwarding between bridged ports to the
> > hardware, so set dsa_default_offload_fwd_mark() to avoid duplicate
> > forwarding of packets of (eg. flooded) frames arriving at the CPU
> > port.
> >
> > Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> > ---
> > net/dsa/tag_mxl862xx.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/net/dsa/tag_mxl862xx.c b/net/dsa/tag_mxl862xx.c
> > index 01f2158682718..c02f69de61cbb 100644
> > --- a/net/dsa/tag_mxl862xx.c
> > +++ b/net/dsa/tag_mxl862xx.c
> > @@ -92,6 +92,8 @@ static struct sk_buff *mxl862_tag_rcv(struct sk_buff *skb,
> > skb_pull_rcsum(skb, MXL862_HEADER_LEN);
> > dsa_strip_etype_header(skb, MXL862_HEADER_LEN);
> >
> > + dsa_default_offload_fwd_mark(skb);
>
> Does the switch (by default) also flood link local traffic (e.g. STP, LACP,
> etc)? If not, you should not mark these as fwd offloaded.

No, it doesn't. Testing revealed that apparently it silently consumes them.
I assume we'll need something like

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

similar to tag_brcm.c, right?

> Is there is a bit in the header that says whether a packet was flooded or
> trapped that you can check?

Earlier testing showed that frames arriving at the microcontroller under
some conditions are relayed to the DSA CPU port -- and are destinguishable
as such. However, there is not bit directly indicating whether the packet
was (also) flooded already.