From: Dan Williams <dcbw@redhat.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev <netdev@vger.kernel.org>,
sf-linux-drivers <linux-net-drivers@solarflare.com>
Subject: Re: Behaviour of ETHTOOL_GLINK for an interface that's down
Date: Thu, 09 Dec 2010 12:29:44 -0600 [thread overview]
Message-ID: <1291919385.11613.8.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1291917939.2647.10.camel@bwh-desktop>
On Thu, 2010-12-09 at 18:05 +0000, Ben Hutchings wrote:
> On Thu, 2010-12-09 at 00:02 -0600, Dan Williams wrote:
> > On Wed, 2010-12-08 at 23:47 -0600, Dan Williams wrote:
> > > On Mon, 2010-12-06 at 21:59 +0000, Ben Hutchings wrote:
> > > > ETHTOOL_GLINK is yet another ethtool operation that has unclear
> > > > semantics that results in differing behaviour when the interface is
> > > > down.
> [...]
> > > > DaveM said that Network Manager may require (2), although I don't think
> > > > this is correct. At least the current version brings all managed
> > > > interfaces up whether or not they have link-up already.
> > >
> > > NM has used netlink + IFF_RUNNING (not ethtool) for a few years for
> > > actual carrier detection. Ethtool (and MII ioctls) are called as a
> > > "best effort" method of determining that the device actually *has*
> > > carrier detection at all, since if the device has gone to the trouble to
> > > implement either MII or ethtool, it probably also has carrier detection.
> > >
> > > But ethtool isn't actually used to determine carrier status in NM. It's
> > > netlink all the way down.
> >
> > And as a follow-on, yes, NM does bring all devices it is allowed to
> > manager IFF_UP because that's the only way (at this point) that we can
> > guarantee functional carrier detect from the card. I'd love it if that
> > weren't the case, and if we could have some indicator that the driver
> > could do carrier detect while in a lower-power state and !IFF_UP, but we
> > don't have that yet.
>
> Thanks for the information, Dan. Presumably it would actually be
> sufficient for NM's requirements to implement 'energy detect' which some
> PHYs can do even in a low power state? (Though I wonder whether that
> works between two PHYs both in a low power state.) You could then use
> this as a trigger to bring the interface up, while still relying on the
> existing link change notification to trigger interface configuration.
> But this clearly has to be separate from ETHTOOL_GLINK, not least
> because you want notification rather than having to poll.
+1 to all of that. If that showed up, I'd love to use it for NM.
Dan
prev parent reply other threads:[~2010-12-09 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 21:59 Behaviour of ETHTOOL_GLINK for an interface that's down Ben Hutchings
2010-12-09 5:47 ` Dan Williams
2010-12-09 6:02 ` Dan Williams
2010-12-09 18:05 ` Ben Hutchings
2010-12-09 18:29 ` Dan Williams [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=1291919385.11613.8.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=bhutchings@solarflare.com \
--cc=linux-net-drivers@solarflare.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;
as well as URLs for NNTP newsgroup(s).