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: 
 <CY8PR02MB956757D131ED149C97F7D0DBF9272@CY8PR02MB9567.namprd02.prod.outlook.com>
Date: Fri, 8 Mar 2024 06:33:00 +0000
From: "Sagar Dhoot (QUIC)" <quic_sdhoot@...cinc.com>
To: Andrew Lunn <andrew@...n.ch>
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"

Hi Andrew,

Thanks for the quick response. Maybe I have put up a confusing scenario.

Let me rephrase with autoneg on.

1. "ethtool eth_interface"
2. "ethtool -s eth_interface speed 25000 autoneg on"
3. "ethtool -s eth_interface autoneg on"

Once the link is up at step 2, "get_link_ksettings" will return the speed as
25G. And if "set_link_ksettings" is invoked at step 3, it will still pass the 
speed value as 25G retrieved with "get_link_ksettings", even though the 
speed was not explicitly specified in the ethtool command. So, after step2,
if I must go back to the default state i.e., advertise all the supported speed 
modes, is there any way to do so?

Thanks,
Sagar

-----Original Message-----
From: Andrew Lunn <andrew@...n.ch> 
Sent: Friday, March 8, 2024 9:44 AM
To: Sagar Dhoot (QUIC) <quic_sdhoot@...cinc.com>
Cc: mkubecek@...e.cz; 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"

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

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