lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c601dc85-67c2-4fa0-bd92-64aa0a0f48df@lunn.ch>
Date: Fri, 4 Jul 2025 19:49:51 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Nikita Yushchenko <nikita.yoush@...entembedded.com>
Cc: Michael Dege <michael.dege@...esas.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
	Niklas Söderlund <niklas.soderlund@...natech.se>,
	Paul Barker <paul@...rker.dev>, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] net: renesas: rswitch: add offloading for L2
 switching

On Fri, Jul 04, 2025 at 11:02:55AM +0200, Nikita Yushchenko wrote:
> > >   	struct phy *serdes;
> > > +
> > > +	struct net_device *brdev;	/* master bridge device */
> > 
> > How many ports does this device have? If it is just two, this might
> > work. But for a multi-port device, you need to keep this in the port
> > structure.
> 
> Having per-device (not per port) brdev was designed by me.  Reasoning is
> that hw L2 forwarding support lacks any sort of source port based filtering,
> which makes it unusable to offload more than one bridge device. Either you
> allow hardware to forward destination MAC to a port, or you have to send it
> to CPU. You can't make it forward only if src and dst ports are in the same
> brdev.

This needs to be part of the commit message, since it is not
obvious. I think some comments in the code would also be good, where
it decides there is a bridge in use, and so it needs to reject the
offload for another bridge. This limitation is very unusual, pretty
much a design error, so it needs calling out.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ