Subject: Re: [PATCH net] netvsc: transfer lower device max tso size during VF transition

From: Vitaly Kuznetsov <[email-masked]>
Date: Wed, 25 Mar 2026 10:47:44 +0100

Li Tian <[email-masked]> writes:

> 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 <[email-masked]>
> ---
>  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));

It seems netif_set_gso_max_size() helper does exactly that, i.e. sets both
gso_max_size and gso_ipv4_max_size.

> +		} else {
>  			netif_set_tso_max_size(ndev, netvsc_dev->netvsc_gso_max_size);
> +		}
>  	}
>  
>  	return NOTIFY_OK;

-- 
Vitaly