[PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

Subsystems: aquantia ethernet driver (atlantic), networking drivers, the rest

STALE3439d

4 messages, 4 authors, 2017-03-17 · open the first message on its own page

[PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

From: David Arcari <hidden>
Date: 2017-03-13 23:07:26

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 <redacted>
Signed-off-by: David Arcari <redacted>
---
 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

Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

From: Pavel Belous <hidden>
Date: 2017-03-14 01:32:53

On 03/14/2017 02:07 AM, David Arcari wrote:
quoted hunk
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 <redacted>
Signed-off-by: David Arcari <redacted>
---
 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);
Tested-by: Pavel Belous <redacted>

Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

From: Jarod Wilson <hidden>
Date: 2017-03-15 21:31:19

On 2017-03-13 7:07 PM, 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 <redacted>
Signed-off-by: David Arcari <redacted>
Would help if I replied to the proper version of the patch. To 
reiterate, patch looks appropriate and necessary.

Reviewed-by: Jarod Wilson <redacted>

-- 
Jarod Wilson
jarod@redhat.com

Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

From: David Miller <davem@davemloft.net>
Date: 2017-03-17 03:29:48

From: David Arcari <redacted>
Date: Mon, 13 Mar 2017 19:07:16 -0400
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 <redacted>
Signed-off-by: David Arcari <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help