Re: [PATCH 2/2] hv_netvsc: Use VF's tso_max_size value when data path is VF
From: Shradha Gupta
Date: Wed Feb 05 2025 - 08:35:51 EST
On Tue, Feb 04, 2025 at 09:56:43PM -0800, Stephen Hemminger wrote:
> On Tue, 4 Feb 2025 20:21:55 -0800
> Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx> wrote:
>
> > On Azure, increasing VF's TCP segment size to up-to GSO_MAX_SIZE
> > is not possible without allowing the same for netvsc NIC
> > (as the NICs are bonded together). For bonded NICs, the min of the max
> > segment size of the members is propagated in the stack.
> >
> > Therefore, we use netif_set_tso_max_size() to set max segment size
> > to VF's segment size for netvsc too, when the data path is switched over
> > to the VF
> > Tested on azure env with Accelerated Networking enabled and disabled.
> >
> > Signed-off-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx>
> > Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
>
> Since datapath can change at anytime (ie hot remove of VF).
> How does TCP stack react to GSO max size changing underneath it.
> Is it like a path MTU change where some packets are lost until
> TCP retries and has to rediscover?
Hi Stephen,
Upon removal of the VF, a change in the MAX segment size (calculated as
min of the new list of participants in the bond) is triggered. This
causes the subsequent skb allocations for the nic for the xmit path to be
under this limit.
During this process, if an SKB with the older seg size (i.e with longer
length) ends up in netvsc stack, the netvsc transport, later silently
segments it in the size that the hardware supports (netvsc_dev->netvsc_gso_max_size)
regards,
Shradha.