netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6] ethtool: Remove fallback to old ethtool operations for ETHTOOL_SFEATURES
Date: Sat, 14 May 2011 21:08:08 +0100	[thread overview]
Message-ID: <1305403688.4065.464.camel@localhost> (raw)
In-Reply-To: <20110514095457.GA31970@rere.qmqm.pl>

[Sending this from my home address as solarflare.com mail is under
maintenance and SPF prevents me using that address entirely.]

On Sat, 2011-05-14 at 11:54 +0200, Michał Mirosław wrote:
> On Sat, May 14, 2011 at 02:05:42AM +0100, Ben Hutchings wrote:
> > ethtool_set_feature_compat() squashes the feature mask into a boolean,
> > which is not correct for ethtool_ops::set_flags.
> > 
> > We could fix this, but the fallback code for ETHTOOL_SFEATURES actually
> > makes things more complicated for the ethtool utility and any other
> > application using the ethtool API.  They will still need to fall back to
> > the old offload control commands in order to support older kernel
> > versions.  The fallback code in the kernel adds a third possibility for
> > them to handle.  So make ETHTOOL_SFEATURES fail when the driver
> > implements the old offload control operations, and let userland do the
> > fallback.
> > 
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> 
> This will disable SFEATURES for drivers which implement changing newer
> features that have no old ethtool ops (e.g.  NETIF_F_LOOPBACK), but are
> not converted, yet. This might matter when bisecting.
> 
> It's easy to fix this.

Yes, I realise that.

> The code is going away for 2.6.40, though.
> Do you want to get rid of ETHTOOL_F_COMPAT bit before 2.6.39?

Right, I don't want this to ever be in a stable release.

> BTW, what are the complications for userspace?

With 2.6.38 and earlier, ETHTOOL_SFEATURES will fail; ethtool -K will
fall back to the individual operations can can report which of them
failed and why.

With 2.6.39 and a converted driver, ethtool -K can find out exactly
which features are changeable and report whether any of the individual
changes are not supported at all.  If there's something wrong with the
combination of features then ETHTOOL_SFEATURES will return
ETHTOOL_F_WISH and it can report that the combination is not supported.

With 2.6.39 and an unconverted driver, ETHTOOL_SFEATURES can return
ETHTOOL_F_COMPAT which just tells us some change failed, but not why.
We can try to guess what went wrong by reading back the features, but
it's unclear.  This is particularly problematic with set_flags (again)
where the ethtool core can't tell which flags are settable in an
unconverted driver.

I would much prefer not to have this third case existing in a single
stable release.

> This change misses ethtool_get_features_compat() setting available bits.

Yes, but that is less of a problem in practice.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2011-05-14 20:08 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14  1:05 [PATCH net-2.6] ethtool: Remove fallback to old ethtool operations for ETHTOOL_SFEATURES Ben Hutchings
2011-05-14  9:54 ` Michał Mirosław
2011-05-14 20:08   ` Ben Hutchings [this message]
2011-05-14 10:31 ` [PATCH] net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags Michał Mirosław
2011-05-14 10:35 ` [PATCH net-2.6] ethtool: Remove fallback to old ethtool operations for ETHTOOL_SFEATURES Michał Mirosław
2011-05-16  2:45   ` Ben Hutchings
2011-05-16 12:13     ` Michał Mirosław
2011-05-16 13:28     ` [PATCH] ethtool: ETHTOOL_SFEATURES: remove NETIF_F_COMPAT return Michał Mirosław
2011-05-16 13:37       ` Ben Hutchings
2011-05-16 14:23         ` Michał Mirosław
2011-05-16 14:53           ` Ben Hutchings
2011-05-16 15:01             ` Michał Mirosław
2011-05-16 15:57               ` [RFC PATCH ethtool 1/3] ethtool: Regularise offload feature settings Ben Hutchings
2011-05-16 15:57               ` [RFC PATCH ethtool 2/3] ethtool: Report any consequential offload feature changes Ben Hutchings
2011-05-16 15:58               ` [RFC PATCH ethtool 3/3] ethtool: Use ETHTOOL_{G,S}FEATURES where available Ben Hutchings
2011-05-16 20:51             ` [PATCH] ethtool: ETHTOOL_SFEATURES: remove NETIF_F_COMPAT return Michał Mirosław
2011-05-16 21:08               ` Ben Hutchings
2011-05-16 21:50                 ` Michał Mirosław
2011-05-16 22:09                   ` Ben Hutchings
2011-05-17  8:45                     ` Michał Mirosław
2011-05-17 20:33                     ` [RFC PATCH ethtool] ethtool: merge ETHTOOL_[GS]FEATURES support to -k/-K modes Michał Mirosław
2011-05-18 19:02                     ` [PATCH] ethtool: ETHTOOL_SFEATURES: remove NETIF_F_COMPAT return Ben Hutchings
2011-05-19  9:18                       ` Michał Mirosław
2011-05-19 13:25                         ` [RFC PATCH v3 ethtool] ethtool: implement [GS]FEATURES calls Michał Mirosław
2011-05-16 20:54             ` [RFC PATCH ethtool] ethtool: implement G/SFEATURES calls Michał Mirosław
2011-05-16 18:09           ` [PATCH] ethtool: ETHTOOL_SFEATURES: remove NETIF_F_COMPAT return David Miller
2011-05-19 10:03             ` Michał Mirosław
2011-05-24  9:14               ` Michał Mirosław
2011-05-24 19:39                 ` David Miller
2011-05-24 21:59                   ` Michał Mirosław
2011-05-27 14:13                     ` Ben Hutchings
2011-05-27 15:28                       ` Michał Mirosław
2011-05-27 15:45                         ` Ben Hutchings
2011-05-27 16:34                           ` Michał Mirosław
2011-05-27 23:25                             ` Ben Hutchings
2011-05-28  7:35                               ` Michał Mirosław
     [not found]                                 ` <20110528073525.GA19033-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org>
2011-05-28 10:07                                   ` [Xen-devel] " Ian Campbell
     [not found]                                     ` <1306577228.23577.17.camel-ztPmHsLffjjnO4AKDKe2m+kiAK3p4hvP@public.gmane.org>
2011-05-28 17:31                                       ` Jesse Gross
     [not found]                                         ` <BANLkTime8PHYe+BFELt92gg7SZ91xKvAwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-29  9:38                                           ` Michał Mirosław
     [not found]                                             ` <20110529093849.GA5245-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org>
2011-05-31 18:43                                               ` Jesse Gross
2011-05-26 10:42                   ` [RESEND PATCH net] net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags Michał Mirosław
2011-05-26 18:14                     ` David Miller
2011-05-14 10:41 ` [PATCH v2] " Michał Mirosław

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=1305403688.4065.464.camel@localhost \
    --to=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=mirq-linux@rere.qmqm.pl \
    --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).