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] [day] [month] [year] [list]
Message-ID: <20250826184559.89822-1-cbabroski@nvidia.com>
Date: Tue, 26 Aug 2025 14:45:59 -0400
From: Chris Babroski <cbabroski@...dia.com>
To: <kuba@...nel.org>
CC: <andrew+netdev@...n.ch>, <cbabroski@...dia.com>, <davem@...emloft.net>,
	<davthompson@...dia.com>, <edumazet@...gle.com>,
	<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>, <hkallweit1@...il.com>, <linux@...linux.org.uk>
Subject: Re: [PATCH net-next v1] mlxbf_gige: report unknown speed and duplex when link is down

Hi Jakub,

Thanks for the feedback.

> If that's the correct thing to do why is
> phy_ethtool_get_link_ksettings() not doing it?

If I understand correctly, phy_ethtool_get_link_ksettings() reads
cached values that are updated when phy_read_status() is called by the
phy state machine. Doing "ifconfig down" will eventually trigger
phy_stop() in the ndo_stop() handler. This halts the phy state machine
and sets phydev->link without calling phy_read_status() or explicitly
setting other values, like speed and duplex.

It seems this is expected behavior with phylib, but I'm not familiar
with the implementation history. CC'd PHY maintainers for additional
input.

> Please explain what makes mlxbf special

BlueField is unique in that the phy is hardwired to an internal switch
and so the physical link between the phy and link partner is always
up. This will also affect what link settings are reported by the phy.

This patch comes from a desire for ethtool output behavior to be the
same when an administrative link down is issued on the BlueField OOB
(mlxbf_gige) and NIC (mlx5) interfaces. The mlx5 driver implements
custom get_link_ksettings() handlers and does not use phylib.

Best,
Chris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ