vmxnet3: update MTU after device quiesce
commit 43f0999af011fba646e015f0bb08b6c3002a0170 upstream.
Currently, when device mtu is updated, vmxnet3 updates netdev mtu, quiesces
the device and then reactivates it for the ESXi to know about the new mtu.
So, technically the OS stack can start using the new mtu before ESXi knows
about the new mtu.
This can lead to issues for TSO packets which use mss as per the new mtu
configured. This patch fixes this issue by moving the mtu write after
device quiesce.
Cc: stable@vger.kernel.org
Fixes: d1a890fa37 ("net: VMware virtual Ethernet NIC driver: vmxnet3")
Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
Acked-by: Guolin Yang <guolin.yang@broadcom.com>
Changes v1-> v2:
Moved MTU write after destroy of rx rings
Link: https://patch.msgid.link/20250515190457.8597-1-ronak.doshi@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ba689e0893
commit
a6ddbf9ae7
@@ -3599,8 +3599,6 @@ vmxnet3_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
struct vmxnet3_adapter *adapter = netdev_priv(netdev);
|
||||
int err = 0;
|
||||
|
||||
WRITE_ONCE(netdev->mtu, new_mtu);
|
||||
|
||||
/*
|
||||
* Reset_work may be in the middle of resetting the device, wait for its
|
||||
* completion.
|
||||
@@ -3614,6 +3612,7 @@ vmxnet3_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
|
||||
/* we need to re-create the rx queue based on the new mtu */
|
||||
vmxnet3_rq_destroy_all(adapter);
|
||||
WRITE_ONCE(netdev->mtu, new_mtu);
|
||||
vmxnet3_adjust_rx_ring_size(adapter);
|
||||
err = vmxnet3_rq_create_all(adapter);
|
||||
if (err) {
|
||||
@@ -3630,6 +3629,8 @@ vmxnet3_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
"Closing it\n", err);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
WRITE_ONCE(netdev->mtu, new_mtu);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user