public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] netvsc: transfer lower device max tso size during VF transition
@ 2026-03-25  4:50 Li Tian
  2026-03-25  9:47 ` Vitaly Kuznetsov
  0 siblings, 1 reply; 2+ messages in thread
From: Li Tian @ 2026-03-25  4:50 UTC (permalink / raw)
  To: netdev, linux-hyperv
  Cc: linux-kernel, Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li,
	Andrew Lunn, Eric Dumazet, Vitaly Kuznetsov, Paolo Abeni,
	Jakub Kicinski, Jason Wang, Li Tian

When netvsc is accelerated by the lower device, we can advertise the
lower device max tso size in order to get better performance.
While a long-term migration to user-space bonding is planned, current
users on RHEL 10 / Azure are experiencing significant performance
regressions in 802.3ad environments. This patch provides a localized,
safe fix within netvsc without introducing new core networking helpers.

Signed-off-by: Li Tian <litian@redhat.com>
---
 drivers/net/hyperv/netvsc_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index ee5ab5ceb2be..971607c7406f 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -2428,10 +2428,14 @@ static int netvsc_vf_changed(struct net_device *vf_netdev, unsigned long event)
 		 * This value is only increased for netvsc NIC when datapath is
 		 * switched over to the VF
 		 */
-		if (vf_is_up)
+		if (vf_is_up) {
 			netif_set_tso_max_size(ndev, vf_netdev->tso_max_size);
-		else
+			WRITE_ONCE(ndev->gso_max_size, READ_ONCE(vf_netdev->gso_max_size));
+			WRITE_ONCE(ndev->gso_ipv4_max_size,
+				   READ_ONCE(vf_netdev->gso_ipv4_max_size));
+		} else {
 			netif_set_tso_max_size(ndev, netvsc_dev->netvsc_gso_max_size);
+		}
 	}
 
 	return NOTIFY_OK;
-- 
2.53.0


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

end of thread, other threads:[~2026-03-25  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25  4:50 [PATCH net] netvsc: transfer lower device max tso size during VF transition Li Tian
2026-03-25  9:47 ` Vitaly Kuznetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox