From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE36A1F4181; Sun, 8 Mar 2026 15:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772983158; cv=none; b=IXdSjQtz5NAVM94gPWyGthdP8fPo5ProIEMegWHRnTo4Mtau0i40W01mSS3r88jcquKqdRShEdTpkJRskWuQmDpTpKwZGmDHZD5d57JefGnZjr/H2fCor8QaCMP6aWGqLfrp4URoQDwVzuUw3cJNxF6pztvv4qCkPUs9NK8/yRY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772983158; c=relaxed/simple; bh=acBv3VbP9SzjRO66t5HLGnGIKuxwF5A2AiO8VDY+Hb8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WYVDlIw0GbJLvkMx+sIrV5b4s4Oq+sLyefuVBWd1Z/lxyjjo49yte6WcrkmqxIoMElOyBNoL4vIWFO5yEyhG0+mfh2Sp/8XHplI4/tUvXqahc3nwX4UlGc7f1AaDbF+3QtWMnSrNhRzEXagi74xGW8yKAvbDSLQjEaLddc8G3I0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1vzFuI-000000000ND-2gX4; Sun, 08 Mar 2026 15:19:02 +0000 Date: Sun, 8 Mar 2026 15:18:59 +0000 From: Daniel Golle To: Jonas Gorski Cc: Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Wunderlich , Chad Monroe , Cezary Wilmanski , Liang Xu , "Benny (Ying-Tsan) Weng" , Jose Maria Verdu Munoz , Avinash Jayaraman , John Crispin Subject: Re: [PATCH net-next 1/2] dsa: tag_mxl862xx: set dsa_default_offload_fwd_mark() Message-ID: References: <3bee5ef1-0692-4779-832f-193017810c38@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bee5ef1-0692-4779-832f-193017810c38@gmail.com> 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 > > --- > > 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.