From: Jeff Garzik <jeff@garzik.org>
To: Ben Hutchings <bhutchings@solarflare.com>,
Stephen Hemminger <shemminger@vyatta.com>,
NetDev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: the future of ethtool
Date: Mon, 15 Nov 2010 19:07:19 -0500 [thread overview]
Message-ID: <4CE1CB37.1020101@garzik.org> (raw)
In-Reply-To: <20101115233335.GB24292@canuck.infradead.org>
On 11/15/2010 06:33 PM, Thomas Graf wrote:
> On Mon, Nov 15, 2010 at 05:49:33PM -0500, Jeff Garzik wrote:
>> s/only// I don't think Stephen is suggesting sending _some_ ops
>> through netlink and others through old-ioctl. That's just silly.
>> Any new netlink interface should transit all existing ETHTOOL_xxx
>> commands/structures.
>>
>> But presumably, one would have the ability to send multiple
>> ETHTOOL_xxx bundled together into a single netlink transaction,
>> facilitating the kernel's calling of struct ethtool_ops'
>> ->begin()
>> ... first operation specified by userspace via netlink ...
>> ... second operation specified by userspace via netlink ...
>> ... etc.
>> ->end()
>>
>> The underlying struct ethtool_ops remains unchanged; you're only
>> changing the transit method.
>>
>> Thus, the ethtool userspace utility would switch entirely to
>> netlink, while the ioctl processing code remains for binary
>> compatibility.
>>
>> Or... ethtool userspace utility could remain unchanged, and a new
>> 'nictool' utility provides the same features but with (a) a new CLI
>> and (b) exclusively uses netlink rather than ioctl.
>
> I actually have code for this including userspace. I never submitted
> it because I wasn't confident it is the way to go since it literally
> duplicates all ethtool code in the kernel.
>
> There is one major problem with bundling multiple requests though. If
> one change request fails but other changes have been committed already
> we can't really undo them without causing lots of races. We have to
> leave the device in a somewhat inconsistent state. It's even difficult
> to tell what has been comitted and what hasn't. It also makes error
> reporting more difficult as a -ERANGE error code could apply to any
> of the values to be changed.
Well, what are the range of possibilities for the _hardware_, given the
current struct ethtool_ops software interface?
We can either reset+restart RXTX after such events, or not.
That's a binary decision, one easily be passed in from userspace before
any ethtool ops are executed.
Further down the road, if one wanted to travel that far, we could save
the hardware state at the beginning, and restore hardware state if
anything fails. Depends on peoples' motivation over this rare issue.
We already save/restore hardware state for suspend/resume, so this does
not seem overly onerous.
Jeff
next prev parent reply other threads:[~2010-11-16 0:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 19:41 the future of ethtool Jeff Garzik
2010-11-15 20:18 ` Ben Hutchings
2010-11-15 20:44 ` Stephen Hemminger
2010-11-15 21:14 ` Ben Hutchings
2010-11-15 21:14 ` Stephen Hemminger
2010-11-15 21:52 ` Ben Hutchings
2010-11-15 22:49 ` Jeff Garzik
2010-11-15 23:33 ` Thomas Graf
2010-11-16 0:07 ` Jeff Garzik [this message]
2010-11-16 0:10 ` Ben Hutchings
2010-11-16 6:25 ` Thomas Graf
2010-11-16 2:02 ` David Miller
2010-11-16 6:17 ` Thomas Graf
2010-11-15 21:03 ` 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=4CE1CB37.1020101@garzik.org \
--to=jeff@garzik.org \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.