From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71A0028031F; Tue, 27 May 2025 17:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748368540; cv=none; b=DGySs+F46k/NXYRkdnluVfOzLBX53xm/nBwF8KkUKdaS3ccAR1gqjKcTUvgYpQJIdR7rdl2ADcp+GzXBi2i5ExqxVCG8KnKwzibXpRA4vMbh6B73jpnpJ4I+cjRHEtzqCprZ/JSrcPfpx5ioME7PtD2+Po4leuS2aBW2N20nDoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748368540; c=relaxed/simple; bh=9bXWSMzK/boexKEifL7lBbotWQKP/pgk4KvQbvyX0R0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sfvhuN//HiyFDvvp3cSaxgAjRgwrgyJVnDQ6eiwz+PQy68aUudk/CR70ZyA9YmuY33k8z3bpQnszrnjzrghlYuvkpTE1PxpLzOARAy1eG1CyVVZujaRne/xeaom9/FahS9sHCnkQ8my+k62Js+MAVm1JgyXKdNqkzWY3zYdKTus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pqYXgaje; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pqYXgaje" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 926B5C4CEE9; Tue, 27 May 2025 17:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748368539; bh=9bXWSMzK/boexKEifL7lBbotWQKP/pgk4KvQbvyX0R0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqYXgajeVANivpk1KrYuayUPEFdAwzrlx0o4Hd2YWvHhDEjSmEVSg+OIhZhRkgWb6 eA8XdPnBJ/wI9g5afrRN7nMdqeaNxzgcNjpH4CMApIgjnCbY/jW5ieGiSIyyYLbGS3 fcwPu04b5LTOK3rBuZ43tOLO3aL0THHtI5Wl5EQw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ronak Doshi , Guolin Yang , Jakub Kicinski Subject: [PATCH 6.14 738/783] vmxnet3: update MTU after device quiesce Date: Tue, 27 May 2025 18:28:55 +0200 Message-ID: <20250527162543.181072363@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ronak Doshi 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: d1a890fa37f2 ("net: VMware virtual Ethernet NIC driver: vmxnet3") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/vmxnet3/vmxnet3_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -3607,8 +3607,6 @@ vmxnet3_change_mtu(struct net_device *ne 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. @@ -3622,6 +3620,7 @@ vmxnet3_change_mtu(struct net_device *ne /* 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) { @@ -3638,6 +3637,8 @@ vmxnet3_change_mtu(struct net_device *ne "Closing it\n", err); goto out; } + } else { + WRITE_ONCE(netdev->mtu, new_mtu); } out: