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: <945530a2-c8e9-49fd-95ce-b39388bd9a95@lunn.ch>
Date: Fri, 8 Mar 2024 05:14:07 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Sagar Dhoot (QUIC)" <quic_sdhoot@...cinc.com>
Cc: "mkubecek@...e.cz" <mkubecek@...e.cz>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Nagarjuna Chaganti (QUIC)" <quic_nchagant@...cinc.com>,
	"Priya Tripathi (QUIC)" <quic_ppriyatr@...cinc.com>
Subject: Re: Ethtool query: Reset advertised speed modes if speed value is
 not passed in "set_link_ksettings"

On Thu, Mar 07, 2024 at 10:09:18AM +0000, Sagar Dhoot (QUIC) wrote:
> Hi Michal and Team,
> 
> We are developing an Ethernet driver here in Qualcomm and have a query w.r.t one of the limitations that we have observed with ethtool.

Hi Sagar

Please configure your mail client to wrap emails to a little less than
80 characters.

> Detailed issue sequence and the commands executed:
> 1. "ethtool eth_interface"
> 	a. Assuming eth_interface is the interface name.
> 	b. By default, the "get_link_ksettings" will publish all the supported/advertised speed modes. Let's say we support 10G and 25G. In that case both speed modes will be advertised in the ethtool output.
> 2. "ethtool -s eth_interface speed 25000 autoneg off"
> 	a. "set_link_ksettings" will be called and speed value will be passed as 25G.
> 	b. Advertised speed mode will be restricted to 25G.

autoneg is off. So advertised does not matter. You are not advertising
anything. You force the PHY and MAC to a specific speed. You should
not touch your local copy of what the PHY is advertising at this
point. You just disable advertisement in the PHY. The link partner
should then see that autoneg is off, and drop the link. You then need
to configure the partner in the same way, so both ends are forced to
the same mode. The link should then come up.

> 	c. Link comes up fine with 25G.
> 3. "ethtool eth_interface"
> 	a. "get_link_ksettings" will publish the link as up with 25G in the ethtool output. Advertised speed mode will be set to 25G and 10G will not be included in that list.

Nope. I would expect advertised to be still 10G and 25G. All you have
done is disable the PHY from advertisement anything.

When you re-enable autoneg, the PHY should then advertise it can do
25G and 40G to the link peer.

> 4. "ethtool -s eth_interface autoneg off"
> 	a. "get_link_ksettings" will be called and as per our implementation, as the link as up, we will return the speed as 25G.

So you have turned autoneg off, but not specified how the MAC/PHY
should be forced. Defaulting to the last link speed seems sensible.

Maybe you are mixing up advertise on/off with advertise N which allows
you to limit what link modes the PHY will advertise it supports?

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ