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-next>] [day] [month] [year] [list]
Message-ID: <ZuhQjx2137ZC_DCz@makrotopia.org>
Date: Mon, 16 Sep 2024 16:36:47 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>,
	Kory Maincent <kory.maincent@...tlin.com>,
	Edward Cree <ecree.xilinx@...il.com>, Andrew Lunn <andrew@...n.ch>,
	Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>
Cc: John Crispin <john@...ozen.org>
Subject: ethtool settings and SFP modules with PHYs

Hi,

I'm wondering how (or rahter: when?) one is supposed to apply ethtool
settings, such as modifying advertisement of speed, duplex, ..., with
SFP modules containing a PHY.

My first approach was to try catching the event of the PHY being
attached and then re-applying ethtool settings[1]. As there isn't a
dedicated event for that, I found that IFF_UP && !IFF_LOWER_UP is as
close as it gets.

However, that doesn't go well with some PHY drivers and the result seems
to depend on a race condition.

Simply ignoring the supported link modes and assuming the kernel would
filter them also doesn't work as also the advertised modes get reset
every time the SFP module is removed or inserted.

Do you think it would make sense to keep the user selection of
advertised modes for each networking device accross removal or insertion
of an SFP module?

The user selection would by default select all known link modes, using
ethtool (ioctl or nl) would modify it, while the actually advertised
modes would always be the intersection of user-selected modes and
supported modes.

Alternatively we could of course also introduce a dedicated NETLINK_ROUTE
event which fires exactly one time once a new is PHY attached.

If there is any way to automically apply user-configured ethtool
settings without any of the above, please be so kind and let me know how
that would work also for PHYs on SFP modules.

Thank you!

With Best Regards

Daniel

[1]: https://git.openwrt.org/?p=project/netifd.git;a=commitdiff;h=68c8a4f94cd3cfd654a52cbc8b57c5c9d99640dd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ