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: <ZCbbx8N5QrzM0ZJK@shredder>
Date:   Fri, 31 Mar 2023 16:10:31 +0300
From:   Ido Schimmel <idosch@...dia.com>
To:     Andy Roulin <aroulin@...dia.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        jiri@...dia.com, andrew@...n.ch, f.fainelli@...il.com,
        mkubecek@...e.cz, mlxsw@...dia.com,
        Danielle Ratson <danieller@...dia.com>
Subject: Re: [PATCH net] ethtool: reset #lanes when lanes is omitted

On Thu, Mar 30, 2023 at 11:38:26AM -0700, Andy Roulin wrote:
> If the number of lanes was forced and then subsequently the user
> omits this parameter, the ksettings->lanes is reset. The driver
> should then reset the number of lanes to the device's default
> for the specified speed.
> 
> However, although the ksettings->lanes is set to 0, the mod variable
> is not set to true to indicate the driver and userspace should be
> notified of the changes.

Code looks fine, but I suggest including before and after examples in
the commit message. Currently, the same operation produces different
results based on the state of the system. For example, if the starting
state is:

# ethtool swp1 | grep -A 3 'Speed: '
        Speed: 400000Mb/s
        Lanes: 8
        Duplex: Full
        Auto-negotiation: on

And I do:

# ethtool -s swp1 speed 100000 autoneg off

I get:

# ethtool swp1 | grep -A 3 'Speed: '
        Speed: 100000Mb/s
        Lanes: 4
        Duplex: Full
        Auto-negotiation: off

But if the current state is:

# ethtool swp1 | grep -A 3 'Speed: '
        Speed: 100000Mb/s
        Lanes: 2
        Duplex: Full
        Auto-negotiation: off

And I do:

# ethtool -s swp1 speed 100000 autoneg off

Nothing changes:

# ethtool swp1 | grep -A 3 'Speed: '
        Speed: 100000Mb/s
        Lanes: 2
        Duplex: Full
        Auto-negotiation: off

I expect that after this patch I will get the same result regardless of
the current state.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ