From: Li Tian <litian@redhat.com>
To: netdev@vger.kernel.org, linux-hyperv@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Long Li <longli@microsoft.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Eric Dumazet <edumazet@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Jason Wang <jasowang@redhat.com>, Li Tian <litian@redhat.com>
Subject: [PATCH net] netvsc: transfer lower device max tso size during VF transition
Date: Wed, 25 Mar 2026 12:50:06 +0800 [thread overview]
Message-ID: <20260325045006.18607-1-litian@redhat.com> (raw)
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
next reply other threads:[~2026-03-25 4:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 4:50 Li Tian [this message]
2026-03-25 9:47 ` [PATCH net] netvsc: transfer lower device max tso size during VF transition Vitaly Kuznetsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325045006.18607-1-litian@redhat.com \
--to=litian@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vkuznets@redhat.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox