public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>,
	Nikolay Aleksandrov <razor@blackwall•org>,
	netdev@vger•kernel.org
Cc: davem@davemloft•net, Jarod Wilson <jarod@redhat•com>,
	Jiri Pirko <jiri@resnulli•us>, Ido Schimmel <idosch@mellanox•com>,
	Sander Eikelenboom <linux@eikelenboom•it>,
	Andy Gospodarek <gospo@cumulusnetworks•com>,
	Florian Fainelli <f.fainelli@gmail•com>
Subject: Re: [PATCH net] net: fix feature changes on devices without ndo_set_features
Date: Wed, 18 Nov 2015 13:51:48 +0300	[thread overview]
Message-ID: <564C5844.9090109@cogentembedded.com> (raw)
In-Reply-To: <564BB3CF.2080507@cumulusnetworks.com>

Hello.

On 11/18/2015 2:10 AM, Nikolay Aleksandrov wrote:

>>> From: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
>>>
>>> When __netdev_update_features() was updated to ensure some features are
>>> disabled on new lower devices, an error was introduced for devices which
>>> don't have the ndo_set_features() method set. Before we'll just set the
>>> new features, but now we return an error and don't set them. Fix this by
>>> returning the old behaviour and setting err to 0 when ndo_set_features
>>> is not present.
>>>
>>> Fixes: e7868a85e1b2 ("net/core: ensure features get disabled on new lower devs")
>>> CC: Jarod Wilson <jarod@redhat•com>
>>> CC: Jiri Pirko <jiri@resnulli•us>
>>> CC: Ido Schimmel <idosch@mellanox•com>
>>> CC: Sander Eikelenboom <linux@eikelenboom•it>
>>> CC: Andy Gospodarek <gospo@cumulusnetworks•com>
>>> CC: Florian Fainelli <f.fainelli@gmail•com>
>>> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
>>> ---
>>> Sander please feel free to give your Tested-by.
>>>
>>>    net/core/dev.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/net/core/dev.c b/net/core/dev.c
>>> index ab9b8d0d115e..4a1d198dbbff 100644
>>> --- a/net/core/dev.c
>>> +++ b/net/core/dev.c
>>> @@ -6426,6 +6426,8 @@ int __netdev_update_features(struct net_device *dev)
>>>
>>>        if (dev->netdev_ops->ndo_set_features)
>>>            err = dev->netdev_ops->ndo_set_features(dev, features);
>>> +    else
>>> +        err = 0;
>>
>>     This makes the 'err' initializer pointless.
>
> It doesn't, there's a previous goto statement that might get hit and we
> need it to be -1 so we don't signal a feature change.

    Ah, sorry, it was late and I was being stupid. :-<

MBR, Sergei

  reply	other threads:[~2015-11-18 10:51 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24  3:40 [RFC PATCH net-next] net/core: initial support for stacked dev feature toggles Jarod Wilson
2015-10-24  4:41 ` Tom Herbert
2015-10-24  5:51 ` Alexander Duyck
2015-10-26  9:42   ` Michal Kubecek
2015-10-30 16:25     ` Jarod Wilson
2015-10-30 20:02       ` Alexander Duyck
2015-11-02 17:37         ` Jarod Wilson
2015-10-30 16:35   ` Jarod Wilson
2015-10-30 20:14     ` Alexander Duyck
2015-11-02 17:53 ` [PATCH net-next] net/core: generic support for disabling netdev features down stack Jarod Wilson
2015-11-02 18:04   ` Alexander Duyck
2015-11-02 21:57     ` Jarod Wilson
2015-11-03  2:55   ` [PATCH v2 " Jarod Wilson
2015-11-03  4:41     ` David Miller
2015-11-03 10:03     ` Nikolay Aleksandrov
2015-11-03 13:52       ` Geert Uytterhoeven
2015-11-03 13:57         ` Jarod Wilson
2015-11-03 14:05           ` Nikolay Aleksandrov
2015-11-03 15:18             ` Jarod Wilson
2015-11-03 15:15     ` [PATCH net-next] net/core: fix for_each_netdev_feature Jarod Wilson
2015-11-03 15:33       ` Nikolay Aleksandrov
2015-11-03 16:34       ` David Miller
2015-11-03 20:36     ` [PATCH net-next] net/core: ensure features get disabled on new lower devs Jarod Wilson
2015-11-03 21:17       ` Alexander Duyck
2015-11-03 22:11         ` Jarod Wilson
2015-11-03 23:01           ` Alexander Duyck
2015-11-03 21:21       ` Nikolay Aleksandrov
2015-11-03 21:53       ` Michal Kubecek
2015-11-03 21:58         ` Jarod Wilson
2015-11-04  4:09       ` [PATCH v2 " Jarod Wilson
2015-11-05  2:56         ` David Miller
2015-11-13  0:26           ` Florian Fainelli
2015-11-13 10:29             ` Jiri Pirko
2015-11-13 10:51               ` Nikolay Aleksandrov
2015-11-13 13:54                 ` [PATCH net] net: fix feature changes on devices without ndo_set_features Nikolay Aleksandrov
2015-11-13 14:00                   ` Jiri Pirko
2015-11-13 14:06                   ` Andy Gospodarek
2015-11-13 14:34                   ` Jarod Wilson
2015-11-13 18:30                   ` Florian Fainelli
2015-11-15  7:25                   ` [net] " Dave Young
2015-11-16  2:01                     ` Dave Young
2015-11-16 19:56                   ` [PATCH net] " David Miller
2015-11-17 23:03                   ` Sergei Shtylyov
2015-11-17 23:10                     ` Nikolay Aleksandrov
2015-11-18 10:51                       ` Sergei Shtylyov [this message]
2015-11-13 22:31                 ` [PATCH v2 net-next] net/core: ensure features get disabled on new lower devs Laura Abbott
2015-11-17  9:02             ` Geert Uytterhoeven
2015-11-17 10:04               ` Geert Uytterhoeven
2016-04-02  2:21     ` [PATCH v2 net-next] net/core: generic support for disabling netdev features down stack 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=564C5844.9090109@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=gospo@cumulusnetworks$(echo .)com \
    --cc=idosch@mellanox$(echo .)com \
    --cc=jarod@redhat$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=linux@eikelenboom$(echo .)it \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nikolay@cumulusnetworks$(echo .)com \
    --cc=razor@blackwall$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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