netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Matthew Wilcox <willy@debian.org>
Cc: netdev@oss.sgi.com, "David S. Miller" <davem@redhat.com>,
	Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH] netdev_ops
Date: Wed, 09 Jul 2003 10:11:04 -0700	[thread overview]
Message-ID: <3F0C4CA8.7090502@candelatech.com> (raw)
In-Reply-To: <20030709161520.GW1939@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox wrote:
> Changes since yesterday's patch:
> 
>  - Make all methods take the struct net_device as suggested by Ben Greear.
>  - Rename self_test_len() and get_stats_len() to *_count() to reflect
>    that they return a count of elements, not a byte length.
>  - Related bugfixes.
>  - Remove the get_strings_len() method; we now infer the length from
>    either self_test_count() or get_stats_count().
>  - memset() the drvinfo struct so it doesn't leak information from the
>    kernel stack (existing bug in tg3).
>  - Clamp regs.len in ethtool.c rather than in the driver.
>  - Pass the stringset value to get_strings() rather than a pointer to
>    the whole ethtool_gstrings struct.
> 
> I have a question about the error return values in ethtool_get_strings().
> Are -EOPNOTSUPP and -EINVAL the right ones to use in the case statement?
> Or should I perhaps be using -ENOSYS instead of EINVAL?  I've noticed
> drepper tends to prefer this for unimplemented subops.  Since this is
> an ioctl(), perhaps I should be using -ENOTTY instead ;-)

Considering any number of things may change in the future, what do
you think of adding a global 'nettool-version' method.  That could
allow user-space code to take appropriate action if something ever
changes in a non-compatible way....

Also, for the strings (labels) passed back to user space, is there any
documentation for suggested values for these strings?  Even though we
can't be completely type-safe, if there were suggested values in
a comment in the code, it could help a great deal for any code trying to
parse them for multiple different drivers/nics.


Ben

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

  reply	other threads:[~2003-07-09 17:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-08 16:30 [PATCH] netdev_ops Matthew Wilcox
2003-07-08 20:44 ` Ben Greear
2003-07-08 21:25   ` Matthew Wilcox
2003-07-08 22:08     ` David S. Miller
2003-07-09 16:15       ` Matthew Wilcox
2003-07-09 17:11         ` Ben Greear [this message]
2003-07-09 17:25           ` Matthew Wilcox
2003-07-09 18:14           ` Jeff Garzik
2003-07-09 18:24             ` Ben Greear
2003-07-11 19:32         ` Jeff Garzik
2003-07-11 19:51           ` Ben Greear
2003-07-11 19:58             ` Jeff Garzik
2003-07-11 20:07               ` Ben Greear
2003-07-11 20:04           ` Matthew Wilcox
2003-07-14  5:53             ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2003-07-10  7:47 Feldman, Scott
2003-07-10  7:42 ` David S. Miller
2003-07-10 11:21 ` Matthew Wilcox
2003-07-10 13:06   ` Jeff Garzik
2003-07-10  8:18 Feldman, Scott
2003-07-10 20:37 ` David S. Miller
2003-07-11  0:53   ` Jeff Garzik

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=3F0C4CA8.7090502@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=acme@conectiva.com.br \
    --cc=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=willy@debian.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).