From: Ido Schimmel <idosch@nvidia.com>
To: Andy Roulin <aroulin@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
jiri@nvidia.com, andrew@lunn.ch, f.fainelli@gmail.com,
mkubecek@suse.cz, mlxsw@nvidia.com,
Danielle Ratson <danieller@nvidia.com>
Subject: Re: [PATCH net] ethtool: reset #lanes when lanes is omitted
Date: Fri, 31 Mar 2023 16:10:31 +0300 [thread overview]
Message-ID: <ZCbbx8N5QrzM0ZJK@shredder> (raw)
In-Reply-To: <659c7c1d-6aa9-0d90-00e4-7a6025ae40b5@nvidia.com>
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.
prev parent reply other threads:[~2023-03-31 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 18:38 [PATCH net] ethtool: reset #lanes when lanes is omitted Andy Roulin
2023-03-31 13:10 ` Ido Schimmel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCbbx8N5QrzM0ZJK@shredder \
--to=idosch@nvidia.com \
--cc=andrew@lunn.ch \
--cc=aroulin@nvidia.com \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=mkubecek@suse.cz \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox