[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb362313-386b-1e35-f1c1-0ee2b79b1e19@redhat.com>
Date: Thu, 9 Mar 2017 15:28:44 -0500
From: David Arcari <darcari@...hat.com>
To: Pavel Belous <pavel.belous@...antia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is
changed
On 03/09/2017 03:01 PM, David Arcari wrote:
> On 03/09/2017 02:02 PM, Pavel Belous wrote:
>>
>>
>> On 09.03.2017 00:33, 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")
>>>
>>> Cc: Pavel Belous <Pavel.Belous@...antia.com>
>>> Signed-off-by: David Arcari <darcari@...hat.com>
>>> ---
>>> drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>>> b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>>> index dad6362..d05fbfd 100644
>>> --- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>>> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
>>> @@ -98,6 +98,7 @@ static int aq_ndev_change_mtu(struct net_device *ndev, int
>>> new_mtu)
>>>
>>> if (err < 0)
>>> goto err_exit;
>>> + ndev->mtu = new_mtu;
>>>
>>> if (netif_running(ndev)) {
>>> aq_ndev_close(ndev);
>>>
>>
>> Thank you, David.
>>
>> I think we should also remove closing/opening net-device after mtu changed.
>
> Hi Pavel,
>
> I'll go ahead and submit v2.
>
> Thanks,
>
> -Dave
Hi Pavel,
Before I post v2, won't that mean that if the interface is up that the user will
have to manually toggle it for the new mtu to take effect?
Is that the desired behavior?
Thanks,
-Dave
>
>>
>> Regards,
>> Pavel
>
Powered by blists - more mailing lists