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: 
 <CY8PR02MB95678EBD09E287FBE73076B9F9202@CY8PR02MB9567.namprd02.prod.outlook.com>
Date: Thu, 7 Mar 2024 10:09:18 +0000
From: "Sagar Dhoot (QUIC)" <quic_sdhoot@...cinc.com>
To: "mkubecek@...e.cz" <mkubecek@...e.cz>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "Nagarjuna Chaganti (QUIC)" <quic_nchagant@...cinc.com>,
        "Priya Tripathi
 (QUIC)" <quic_ppriyatr@...cinc.com>
Subject: Ethtool query: Reset advertised speed modes if speed value is not
 passed in "set_link_ksettings"

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.

Requirement:
	- We are trying to manage the advertised speed modes based on the input from "ethtool -s" command, and trying to support options like "speed", "autoneg" and "lanes".
	- By default, the "get_link_ksettings" will publish all the supported/advertised speed modes.
	- If the speed is modified using "set_link_ksettings", we will limit the advertised speed mode corresponding to the speed being passed in the ethtool command.
	- And if in the subsequent "set_link_ksettings" command, if the speed is not provided, we want to reset and go back to the default state(i.e. again publish all the supported/advertised speed modes).

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.
	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.
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.
	b. "set_link_ksettings" will be called and speed will still be provided as 25G(from step 4a), even though the user has not provided any speed value in the ethtool command.
	c. We will still restrict the advertised speed to 25G. Whereas the expectation was that we reset back to a combination of 10G and 25G again.

So basically, we are trying to understand if there is a way in "set_link_ksettings" to differentiate if the speed value was passed by the user, or not. In short, a way to differentiate between:
	- Speed value explicitly passed by user via ethtool command as seen in step 2a.
		v/s
	- Speed value not set by user but still being passed after queried with "get_link_ksettings" in step 4b.


Can you please help investigate this query and let us know if you need any further details. Thanks in advance!


Thanks,
Sagar


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ