From: Roger Luethi <rl@hellgate.ch>
To: Tim Hockin <thockin@hockin.org>
Cc: Marc Herbert <marc.herbert@free.fr>,
netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC] ethtool semantics
Date: Mon, 14 Jun 2004 21:42:56 +0200 [thread overview]
Message-ID: <20040614194256.GC22012@k3.hellgate.ch> (raw)
In-Reply-To: <20040614170138.GA32594@hockin.org>
On Mon, 14 Jun 2004 10:01:38 -0700, Tim Hockin wrote:
> On Mon, Jun 14, 2004 at 03:11:15PM +0200, Marc Herbert wrote:
> > > That is absolutely the correct thing to do, module parameters for
> > > link settings are %100 deprecated, people need to use ethtool for
> > > everything.
> >
> > This is precisely the reason why I am concerned about having "rich"
> > ethtool semantics. A unified, standard interface is great,... as long
> > it does not leave behind some features, like setting the advertised
> > values in autoneg. As a user of these features, I hope driver
> > developers will NOT remove those module_param features that cannot
> > migrated to ethtool.
>
> So propose a sane semantic that handles all three cases:
> * autoneg on
> * autoneg off
> * autoneg on but limited
My first thought was if a command contains speed/duplex settings
and autoneg is on, manipulate advertised value; if autoneg is off,
force mode. That's not possible due to the way ethtool interacts with
the kernel: It doesn't request a change in a specific field. Instead,
ethtool reads all fields, flips the values it wants to have changed,
then issues a set request for everything (speed, duplex, autoneg,
etc.). In other words: speed/duplex fields are set for every call.
One way out would be to have an explicit third option, say autoneg mask.
That would give:
autoneg on + speed/duplex -> error (only userspace/ethtool can do this!)
autoneg off + speed/duplex -> force mode (driver)
autoneg mask + speed/duplex -> change advertised value (driver)
Many drivers would only support one of these two methods (force mode
presumably), so we'd have to either throw an error if an unsupported
method is requested, or print a notice and use the supported method to
force the requested mode.
Roger
prev parent reply other threads:[~2004-06-14 19:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 21:28 [RFC] ethtool semantics Roger Luethi
2004-06-07 21:57 ` David S. Miller
2004-06-07 23:43 ` Marc Herbert
2004-06-08 21:08 ` Roger Luethi
2004-06-09 21:09 ` Bill Davidsen
2004-06-09 21:38 ` Roger Luethi
2004-06-09 22:12 ` David S. Miller
2004-06-14 13:11 ` Marc Herbert
2004-06-14 17:01 ` Tim Hockin
2004-06-14 19:32 ` Marc Herbert
2004-06-14 19:42 ` Roger Luethi [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=20040614194256.GC22012@k3.hellgate.ch \
--to=rl@hellgate.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.herbert@free.fr \
--cc=netdev@oss.sgi.com \
--cc=thockin@hockin.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).