Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vmxnet3: update MTU after device quiesce

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: d1a890fa37f2 ("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>

authored by

Ronak Doshi and committed by
Jakub Kicinski
43f0999a 91b6dbce

+3 -2
+3 -2
drivers/net/vmxnet3/vmxnet3_drv.c
··· 3607 3607 struct vmxnet3_adapter *adapter = netdev_priv(netdev); 3608 3608 int err = 0; 3609 3609 3610 - WRITE_ONCE(netdev->mtu, new_mtu); 3611 - 3612 3610 /* 3613 3611 * Reset_work may be in the middle of resetting the device, wait for its 3614 3612 * completion. ··· 3620 3622 3621 3623 /* we need to re-create the rx queue based on the new mtu */ 3622 3624 vmxnet3_rq_destroy_all(adapter); 3625 + WRITE_ONCE(netdev->mtu, new_mtu); 3623 3626 vmxnet3_adjust_rx_ring_size(adapter); 3624 3627 err = vmxnet3_rq_create_all(adapter); 3625 3628 if (err) { ··· 3637 3638 "Closing it\n", err); 3638 3639 goto out; 3639 3640 } 3641 + } else { 3642 + WRITE_ONCE(netdev->mtu, new_mtu); 3640 3643 } 3641 3644 3642 3645 out: