[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77c30632-849f-8b7b-42ef-be8b32981c15@huawei.com>
Date: Thu, 16 Mar 2023 09:47:14 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Ronak Doshi <doshir@...are.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "stable@...r.kernel.org" <stable@...r.kernel.org>,
Pv-drivers <Pv-drivers@...are.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Guolin Yang <gyang@...are.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] vmxnet3: use gro callback when UPT is enabled
On 2023/3/16 7:44, Ronak Doshi wrote:
>
>> On 3/14/23, 8:05 PM, "Yunsheng Lin" <linyunsheng@...wei.com <mailto:linyunsheng@...wei.com>> wrote:
>>
>> I am not sure how we can handle the runtime hw capability changing thing yet, that is why
>> I suggested setting the hw capability during the driver init process, then user can enable
>> or disable GRO if need to.
>>
> It is not about enabling or disabling the LRO/GRO. It is about which callback to be used to
> deliver the packets to the stack.
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.
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.
Calling netif_receive_skb() with NETIF_F_GRO bit set in netdev->features will cause
confusion for user, IMHO.
>
> During init, the vnic will always come up in emulation (non-UPT) mode and user can request
> whichever feature they want (lro or gro or both). If it is in UPT mode, as we know UPT device
> does not support LRO, we use gro API to deliver. If GRO is disabled by the user, then it can still
> take the normal path. If in emulation (non-UPT) mode, ESXi will perform LRO.
>
>> Suppose user enable the software GRO using ethtool, disabling the GRO through some runtime
>> checking seems against the will of the user.
>>
> We are not disabling GRO here, it's either we perform LRO on ESXi or GRO in guest stack.
I means software GRO performed by netstack.
There are NETIF_F_GRO_HW and NETIF_F_LRO bit for GRO and LRO performed by hw. LRO on ESXi
is like hw offload in the eye of the driver in the guest, even if it is processed by some
software in the ESXi.
>
>
>> Also, if you are able to "add an event to notify the guest about this", I suppose the
>> para-virtualized driver will clear the specific bit in netdev->hw_features and
>> netdev->features when handling the event? does user need to be notified about this, does
>> user get confusion about this change without notification?
>>
> We won’t be changing any feature bits. It is just to let know the driver that UPT is active and it
> should use GRO path instead of relying on ESXi LRO.
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.
>
> Thanks,
> Ronak
>
Powered by blists - more mailing lists