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: <802f71b2-8707-4799-8258-89c4315a00c2@lunn.ch>
Date: Sun, 7 Jan 2024 18:14:15 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Russell King <rmk+kernel@...linux.org.uk>,
	Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 RFC 4/5] ethtool: add linkmode bitmap support to
 struct ethtool_keee

On Sat, Jan 06, 2024 at 11:21:31PM +0100, Heiner Kallweit wrote:
> Add linkmode bitmap members to struct ethtool_keee, but keep the legacy
> u32 bitmaps for compatibility with existing drivers.
> Use link_modes.supported not being empty as indicator that a user wants
> to use the linkmode bitmap members instead of the legacy bitmaps.

So my fear is, the legacy code will never get cleaned up.

How many MAC drivers are there which don't use phylib/phylink?

Maybe i can help out converting them.

> +++ b/include/linux/ethtool.h
> @@ -223,6 +223,11 @@ __ethtool_get_link_ksettings(struct net_device *dev,
>  			     struct ethtool_link_ksettings *link_ksettings);
>  
>  struct ethtool_keee {
> +	struct {
> +		__ETHTOOL_DECLARE_LINK_MODE_MASK(supported);
> +		__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising);
> +		__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising);
> +	} link_modes;
>  	u32	supported;
>  	u32	advertised;
>  	u32	lp_advertised;

I don't particularly like having the link_modes struct here. The end
goal should be that supported, advertised and lp_advertised become
link modes, and all the drivers are changed to use them.

Maybe we have one patch which does another global replace,
supported->supported_u32, advertised->advertised_32, etc, making space
for link mode symbols. phylib can directly use the new link modes so
there is no real change in that code. We can then convert the MAC
drivers not using phylib one by one, and then remove the _u32 members
at the end.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ