Re: [PATCH net] vmxnet3: use gro callback when UPT is enabled

From: Ronak Doshi
Date: Thu Mar 16 2023 - 00:04:07 EST



> On 3/15/23, 6:47 PM, "Yunsheng Lin" <linyunsheng@xxxxxxxxxx <mailto:linyunsheng@xxxxxxxxxx>> wrote:
>
> That's the piont I am trying to make.
> If I understand it correctly, you can not change callback from napi_gro_receive() to
> netif_receive_skb() when netdev->features has the NETIF_F_GRO bit set.
Where are we doing this? Our preference is to use netif_receive_skb() only when LRO is enabled.
If both LRO and GRO are enabled on the vnic, which API should be used?

> NETIF_F_GRO bit in netdev->features is to tell user that netstack will perform the
> software GRO processing if the packet can be GRO'ed.
Even if the packet is already LRO'ed?

> Calling netif_receive_skb() with NETIF_F_GRO bit set in netdev->features will cause
> confusion for user, IMHO.
As long as LRO is enabled and performed by ESXi (which it will do), I don’t think user cares for GRO.
Even if we use napi_gro_receive() for such case, it degrades the performance as unnecessary cycles
are spend on an already LRO'ed packet.


> As above, there is different feature bit for that, NETIF_F_LRO, NETIF_F_GRO and
> NETIF_F_GRO_HW.
> IMHO, deciding which callback to be used depending on some driver configuation
> without corporation with the above feature bits does not seems right to me.

We are not neglecting feature bits. We just know that in UPT LRO won’t be done, so we by
default use napi_gro_receive() callback.

Thanks,
Ronak