net: ethernet: aquantia: set net_device mtu when mtu is changed
Subsystems (3)
PATCH 1/1 net: ethernet: aquantia: set net_device mtu when mtu is changed
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.
--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/aquantia/atlantic/aq_main.c +1 -0
@@ -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);
Signature · 1 line
1.8.3.1
Quoted 21 lines · David Arcari
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/aquantia/atlantic/aq_main.c +0
-0
drivers/net/ethernet/aquantia/atlantic/aq_main.c static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu) · line 104
Quoted 7 lines
drivers/net/ethernet/aquantia/atlantic/aq_main.c +1
-0@@ -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.
Regards,
Pavel
Quoted 30 lines · Pavel Belous
Quoted 27 lines · David Arcari
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/aquantia/atlantic/aq_main.c +1
-0@@ -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;
Quoted 7 lines
Quoted 3 lines
drivers/net/ethernet/aquantia/atlantic/aq_main.c +0
-0if (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
Quoted 3 lines
Regards,
Pavel
Quoted 39 lines · David Arcari
Quoted 30 lines · Pavel Belous
Quoted 27 lines · David Arcari
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/aquantia/atlantic/aq_main.c +1
-0@@ -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;Quoted 7 lines
Quoted 3 lines
drivers/net/ethernet/aquantia/atlantic/aq_main.c +0
-0if (netif_running (ndev)) {aq_ndev_close(ndev);Thank you, David.
I think we should also remove closing/opening net-device after mtu changed.
Quoted 7 lines
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
Quoted 5 lines
Quoted 4 lines
Regards,
Pavel
Quoted 50 lines · David Arcari
Quoted 39 lines · David Arcari
Quoted 30 lines · Pavel Belous
Quoted 27 lines · David Arcari
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/aquantia/atlantic/aq_main.c +1
-0@@ -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;Quoted 7 lines
Quoted 3 lines
drivers/net/ethernet/aquantia/atlantic/aq_main.c +0
-0if (netif_running (ndev)) {aq_ndev_close(ndev);Thank you, David.
I think we should also remove closing/opening net-device after mtu changed.
Quoted 7 lines
Hi Pavel,
I'll go ahead and submit v2.
Thanks,
-Dave
Hi Pavel,
Quoted 15 lines
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
Quoted 5 lines
Quoted 4 lines
Regards,
Pavel
No. The new mtu will take effect immediately.
Closing/opening is not needed at all.
Regards,
Pavel
From: David Arcari <[email protected]>
Date: Wed, 8 Mar 2017 16:33:21 -0500
Quoted 11 lines
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>
Applied, thanks.
Quoted 10 lines · David Miller
From: David Arcari <[email protected]>
Date: Wed, 8 Mar 2017 16:33:21 -0500Quoted 7 lines
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.
Quoted 7 lines
Quoted 4 lines
Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>Applied, thanks.
Hi David,
I see that my patch:
"net: ethernet: aquantia: call set_irq_affinity_hint before free_irq"
has been applied to net, but I don't see that this patch has been applied.
Is there any chance that you replied to the wrong patch? Or am I missing something?
Thanks,
-Dave
David Miller
maintainerFrom: David Arcari <[email protected]>
Date: Mon, 13 Mar 2017 11:50:50 -0400
Quoted 19 lines · David Miller
Quoted 10 lines
From: David Arcari <[email protected]>
Date: Wed, 8 Mar 2017 16:33:21 -0500Quoted 7 lines
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Quoted 7 lines
Quoted 4 lines
Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>Applied, thanks.
Quoted 7 lines
Hi David,
I see that my patch:
"net: ethernet: aquantia: call
set_irq_affinity_hintbeforefree_irq"has been applied to net, but I don't see that this patch has been applied.
It is marked as "changes requested" in patchwork, because you were asked to do the restart label removal in a separate patch.
Quoted 24 lines · David Miller
From: David Arcari <[email protected]>
Date: Mon, 13 Mar 2017 11:50:50 -0400Quoted 21 lines · David Miller
Quoted 10 lines
From: David Arcari <[email protected]>
Date: Wed, 8 Mar 2017 16:33:21 -0500Quoted 7 lines
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Quoted 7 lines
Quoted 4 lines
Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>Applied, thanks.
Hi David,
Quoted 9 lines
Quoted 5 lines
I see that my patch:
"net: ethernet: aquantia: call
set_irq_affinity_hintbeforefree_irq"has been applied to net, but I don't see that this patch has been applied.
It is marked as "changes requested" in patchwork, because you were asked to do the restart label removal in a separate patch.
Sorry, I was not clear. I was trying to ask if your "Applied, thanks" reply (above) was meant for this email thread. I believe it was meant for the set_irq_affinity_hint patch.
Thanks,
-DA
Quoted 11 lines · David Arcari
When the aquantia device mtu is changed the
net_devicestructure is not updated. As a result the ip command does not properly reflect the mtu change.Commit
5513e16421cbincorrectly assumed that__dev_set_mtu()was making the assignmentndev->mtu=new_mtu; This is not true in the case where the driver has ando_change_mturoutine.Fixes 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu")Cc Pavel Belous <[email protected]>Signed-off-by David Arcari <[email protected]>
Looks like an appropriate and necessary fix to me.
Signature · 2 lines
Jarod Wilson [email protected]