netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Fink <billfink@mindspring.com>
To: "Jeff Kirsher" <tarbal@gmail.com>
Cc: mchan@broadcom.com, jgarzik@pobox.com, netdev@vger.kernel.org,
	davem@davemloft.net, john.ronciak@intel.com,
	jesse.brandeburg@intel.com
Subject: Re: [PATCH] ethtool v4: add autoneg advertise feature
Date: Fri, 25 Aug 2006 20:58:07 -0400	[thread overview]
Message-ID: <20060825205807.0af2f721.billfink@mindspring.com> (raw)
In-Reply-To: <9929d2390608251728u3c182abcya76e3139b82101a1@mail.gmail.com>

On Fri, 25 Aug 2006, Jeff Kirsher wrote:

> On 8/25/06, Bill Fink <billfink@mindspring.com> wrote:
> >
> > I agree.  Something like:
> >
> >         ethtool -s ethx auto on advertise mode1+mode2+...+moden
> >
> > For example:
> >
> >         ethtool -s ethx auto on advertise 100-half+100-full
> >
> > to set speed 100 either half or full duplex.
> >
> > Maybe have some abbreviations such as 100-all (same as above) or
> > all-half (for all supported half duplex) or just all (for all supported
> > modes), which I suppose is the default.
> >
> > Just an idea.
> >
> >                                                 -Bill
> >
> 
> I agree that using a hex value is less intuitive, but with proper
> documentation in the man file it would be easily understood.  It is
> also easier to state
> ethtool -s ethx autoneg on advertise 0x0F
> than it would be to do:
> ethtool -s ethx autoneg on advertise 100-half+100-full+10-half+10-full

This could be abbreviated to:

	ethtool -s ethx autoneg on advertise 100-all+10-all

> Not that it is impossible to do, but the code to do the parsing would
> not be as clean as it is to use a hex value.  Currently ethtool
> already uses numeric values for messagelevel, phyad and sopass.  So I
> am not suggesting something completely new.  I have already submitted
> a patch to keep the old functionality while adding the new.  Only
> thing left for this is to create the manual documentation so that
> users can easily understand how to use the functionality.
> 
> 10-half     = 0x01
> 10-full      = 0x02
> 100-half   = 0x04
> 100-full    = 0x08
> 1000-half = 0x10 (actually not supported by IEEE standards)

I thought the above wasn't a supported option.

> 1000-full  = 0x20
> auto        = 0x00 or 0x3F
> 
> In addition the code already tests the value that the user enters with
> what is supported and only displays the supported values.

I agree that with decent documentation, use of the hex values shouldn't
be that difficult for most users, although using hex arithmetic might
be Greek to some.  I was just suggesting a possible alternative, but
I admit it's a fairly minor issue one way or the other.

						-Bill

      reply	other threads:[~2006-08-26  0:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060805054256.14081.74770.stgit@lunar.tarbal.com>
2006-08-24  6:26 ` [PATCH] ethtool v4: add autoneg advertise feature Jeff Garzik
2006-08-24 15:22   ` Jeff Kirsher
2006-08-24 15:41     ` Michael Chan
2006-08-24 15:54       ` Jeff Kirsher
2006-08-24 15:59       ` Auke Kok
2006-08-24 16:05         ` Auke Kok
2006-08-24 16:12         ` Jeff Kirsher
2006-08-25 23:42       ` Bill Fink
2006-08-26  0:28         ` Jeff Kirsher
2006-08-26  0:58           ` Bill Fink [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=20060825205807.0af2f721.billfink@mindspring.com \
    --to=billfink@mindspring.com \
    --cc=davem@davemloft.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=tarbal@gmail.com \
    /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).