From: Ben Hutchings <bhutchings@solarflare.com>
To: Matt Carlson <mcarlson@broadcom.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Flow control config vs status
Date: Fri, 07 Oct 2011 22:38:53 +0100 [thread overview]
Message-ID: <1318023533.2771.91.camel@bwh-desktop> (raw)
In-Reply-To: <20111007211918.GA7388@mcarlson.broadcom.com>
On Fri, 2011-10-07 at 14:19 -0700, Matt Carlson wrote:
> Hi Ben. I've been encountering with a small problem with how ethtool
> handles flow control settings.
>
> When the admin runs 'ethtool -A ...', ethtool will run an
> ETHTOOL_GPAUSEPARAM query, check the new settings against the 'old',
> and then issue ETHTOOL_SPAUSEPARAM if they don't match. My problem is
> that the tg3 driver returns the flow control status in a
> ETHTOOL_GPAUSEPARAM query, not the configuration.
That's a bug in the driver.
> So, as an example of the problem, if the local side sets
> 'ethtool -A ethx rx on tx on autoneg on', and then the remote side sets
> 'ethtool -A ethy rx off tx off autoneg off', the link will autoneg to rx
> off, tx off. Then, the local side will be unable to turn off rx or tx
> flow control because ethtool will act on the current link flow control
> status, not the config.
>
> The tg3 isn't the only driver that reports flow control status through
> ETHTOOL_GPAUSEPARAM. The e1000e, bnx2, and bnx2x drivers do this as
> well.
>
> The ETHTOOL_GSET query does make room for flow control advertisements,
> but a device doesn't have to advertise its flow control settings if flow
> control autoneg is turned off.
But if flow control autoneg is off then ETHTOOL_GPAUSEPARAM / ethtool -a
already tells you all you need to know.
> I'm thinking this interface doesn't really solve the problem.
>
> Any recommendations?
ethtool -a should always show the administrative configuration. If it
shows that flow control autoneg is on, the administrator can then run
ethtool with no options to see what the link partner advertised.
Now, not everyone has memorised IEEE 802.3 table 28B-3, so maybe if
autoneg is enabled then 'ethtool -a' should also call ETHTOOL_GSET and
work out and display the result of autonegotiation of flow control.
That would have to be conditional on lp_advertising being non-zero.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
prev parent reply other threads:[~2011-10-07 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 21:19 Flow control config vs status Matt Carlson
2011-10-07 21:38 ` Ben Hutchings [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=1318023533.2771.91.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=mcarlson@broadcom.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