From: David Arcari <darcari@redhat.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>, netdev@vger.kernel.org
Cc: Pavel Belous <Pavel.Belous@aquantia.com>
Subject: Re: [PATCH v2] net: ethernet: aquantia: set net_device mtu when mtu is changed
Date: Fri, 10 Mar 2017 09:47:55 -0500 [thread overview]
Message-ID: <58C2BC9B.6040907@redhat.com> (raw)
In-Reply-To: <285b77bc-f7d1-9ad6-1bc6-639f13ff9b83@gmx.de>
Hi,
On 03/09/2017 05:43 PM, Lino Sanfilippo wrote:
> Hi,
>
> On 09.03.2017 22:03, David Arcari wrote:
>> When the aquantia device mtu is changed the net_device structure is not
>> updated. As a result the ip command does not properly reflect the mtu change.
>>
>> Commit 5513e16421cb incorrectly assumed that __dev_set_mtu() was making the
>> assignment ndev->mtu = new_mtu; This is not true in the case where the driver
>> has a ndo_change_mtu routine.
>>
>> Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")
>>
>> v2: no longer close/open net-device after mtu change
>>
>> Cc: Pavel Belous <Pavel.Belous@aquantia.com>
>> Signed-off-by: David Arcari <darcari@redhat.com>
>> ---
>> drivers/net/ethernet/aquantia/atlantic/aq_main.c | 10 ++--------
>> 1 file changed, 2 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>> index dad6362..bba5ebd 100644
>> --- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>> @@ -96,15 +96,9 @@ static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu)
>> struct aq_nic_s *aq_nic = netdev_priv(ndev);
>> int err = aq_nic_set_mtu(aq_nic, new_mtu + ETH_HLEN);
>>
>> - if (err < 0)
>> - goto err_exit;
>> + if (!err)
>> + ndev->mtu = new_mtu;
>>
>> - if (netif_running(ndev)) {
>> - aq_ndev_close(ndev);
>> - aq_ndev_open(ndev);
>> - }
>> -
>> -err_exit:
>
> Removing the restart has nothing to do with the bug you want to fix here, has it?
> I suggest to send a separate patch for this.
>
> Regards,
> Lino
>
I'm fine with that. Pavel does that work for you?
It would mean that the original version of this patch should be applied and
either you or I could send the follow-up patch.
Best,
-Dave
next prev parent reply other threads:[~2017-03-10 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 21:03 [PATCH v2] net: ethernet: aquantia: set net_device mtu when mtu is changed David Arcari
2017-03-09 22:01 ` Pavel Belous
2017-03-09 22:43 ` Lino Sanfilippo
2017-03-10 14:47 ` David Arcari [this message]
2017-03-10 21:19 ` Pavel Belous
2017-03-13 20:30 ` David Arcari
2017-03-13 22:10 ` 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=58C2BC9B.6040907@redhat.com \
--to=darcari@redhat.com \
--cc=LinoSanfilippo@gmx.de \
--cc=Pavel.Belous@aquantia.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 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.