Re: [PATCH net] vmxnet3: use gro callback when UPT is enabled
From: Ronak Doshi
Date: Tue Mar 14 2023 - 22:27:25 EST
> On 3/14/23, 6:52 PM, "Yunsheng Lin" <linyunsheng@xxxxxxxxxx <mailto:linyunsheng@xxxxxxxxxx>> wrote:
>
> Does clearing the NETIF_F_GRO for netdev->features bring back the performance?
> If no, maybe there is something need investigating.
Yes, it does. Simply using netif_receive_skb works fine.
> Checking rq->shared->updateRxProd in the driver to decide if gro is allow does not seems right to
> me, as the netstack has used the NETIF_F_GRO checking in netif_elide_gro().
>
updateRxProd is NOT being used to determine if GRO is allowed. It is being used to indicate UPT is
active, so the driver should just use GRO callback. This is as good as having only GRO callback for UPT driver
which you were suggesting earlier.
> Does clearing NETIF_F_GRO for netdev->features during the driver init process works for your
> case?
No this does not work as UPT mode can be enabled/disabled at runtime without guest being informed.
This is para-virtualized driver and does not know if the guest is being run in emulation or UPT.
> As netdev->hw_features is for the driver to advertise the hw's capability, and the driver
> can enable/disable specific capability by setting netdev->features during the driver init
> process, and user can get to enable/disable specific capability using ethtool later if user
> need to.
As I mentioned above, guest is not informed at runtime about UPT status. So, we need this
mechanism to avoid performance penalty.
Thanks,
Ronak