All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed
@ 2017-03-08 21:33 David Arcari
  2017-03-09 19:02 ` Pavel Belous
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David Arcari @ 2017-03-08 21:33 UTC (permalink / raw)
  To: netdev; +Cc: David Arcari, Pavel Belous

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@aquantia.com>
Signed-off-by: David Arcari <darcari@redhat.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);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed
@ 2017-03-13 23:07 David Arcari
  2017-03-14  1:32 ` Pavel Belous
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David Arcari @ 2017-03-13 23:07 UTC (permalink / raw)
  To: netdev; +Cc: David Arcari, Pavel Belous

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@aquantia.com>
Signed-off-by: David Arcari <darcari@redhat.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);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-17  3:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 21:33 [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed David Arcari
2017-03-09 19:02 ` Pavel Belous
2017-03-09 20:01   ` David Arcari
2017-03-09 20:28     ` David Arcari
2017-03-09 20:57       ` Pavel Belous
2017-03-13  6:09 ` David Miller
2017-03-13 15:50   ` David Arcari
2017-03-13 19:56     ` David Miller
2017-03-13 23:02       ` David Arcari
2017-03-15 20:49 ` Jarod Wilson
2017-03-13 23:07 David Arcari
2017-03-14  1:32 ` Pavel Belous
2017-03-15 21:31 ` Jarod Wilson
2017-03-17  3:21 ` David Miller

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.