From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: Murali Krishna Policharla <murali.policharla@broadcom.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"amritha.nambiar@intel.com" <amritha.nambiar@intel.com>,
"ecree@solarflare.com" <ecree@solarflare.com>,
"alexander.h.duyck@intel.com" <alexander.h.duyck@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: core: Fix to store new mtu setting in netdevice.
Date: Tue, 1 Jan 2019 07:54:59 +0000 [thread overview]
Message-ID: <b2127534-4e9c-1fef-27f1-72329595c3a3@virtuozzo.com> (raw)
In-Reply-To: <1546324934-17555-1-git-send-email-murali.policharla@broadcom.com>
On 01.01.2019 09:42, Murali Krishna Policharla wrote:
> Store newly configured mtu settings in the netdevice after mtu
> configuration is successful to the dsa switch.
>
> Fixes: 2315dc91a5 ("net: make dev_set_mtu() honor notification return code")
> Signed-off-by: Murali Krishna Policharla <murali.policharla@broadcom.com>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> net/core/dev.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 722d50d..58617aa 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -7586,12 +7586,15 @@ int dev_change_flags(struct net_device *dev, unsigned int flags)
> int __dev_set_mtu(struct net_device *dev, int new_mtu)
> {
> const struct net_device_ops *ops = dev->netdev_ops;
> + int ret = 0;
>
> if (ops->ndo_change_mtu)
> - return ops->ndo_change_mtu(dev, new_mtu);
Is there a .ndo_change_mtu callback, which does not assign a new mtu itself?
> + ret = ops->ndo_change_mtu(dev, new_mtu);
>
> - dev->mtu = new_mtu;
> - return 0;
> + if (ret >= 0)
> + dev->mtu = new_mtu;
> +
> + return ret;
> }
> EXPORT_SYMBOL(__dev_set_mtu);
>
>
next prev parent reply other threads:[~2019-01-01 7:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 6:42 Murali Krishna Policharla
2019-01-01 7:54 ` Kirill Tkhai [this message]
2019-01-01 9:40 ` Heiner Kallweit
2019-01-01 23:36 ` Andrew Lunn
2019-01-02 6:27 ` Heiner Kallweit
2019-01-01 8:34 ` Andrew Lunn
2019-01-01 9:48 ` Murali Krishna Policharla
2019-01-01 23:24 ` Andrew Lunn
2019-01-02 9:54 ` Murali Krishna Policharla
2019-01-02 13:16 ` Andrew Lunn
2019-01-03 9:54 ` Murali Krishna Policharla
2019-01-01 9:35 ` Heiner Kallweit
2019-01-01 21:44 ` David Miller
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=b2127534-4e9c-1fef-27f1-72329595c3a3@virtuozzo.com \
--to=ktkhai@virtuozzo.com \
--cc=alexander.h.duyck@intel.com \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=ecree@solarflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=murali.policharla@broadcom.com \
--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
all inboxes | Powered by JetHome®