mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yunsheng Lin <linyunsheng@huawei.com>
To: Ronak Doshi <doshir@vmware.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
	Pv-drivers <Pv-drivers@vmware.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Guolin Yang <gyang@vmware.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] vmxnet3: use gro callback when UPT is enabled
Date: Thu, 16 Mar 2023 09:47:14 +0800	[thread overview]
Message-ID: <77c30632-849f-8b7b-42ef-be8b32981c15@huawei.com> (raw)
In-Reply-To: <AA320ADE-E149-4C0D-80D5-338B19AD31A2@vmware.com>

On 2023/3/16 7:44, Ronak Doshi wrote:
> 
>> On 3/14/23, 8:05 PM, "Yunsheng Lin" <linyunsheng@huawei.com <mailto:linyunsheng@huawei.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
> 

  reply	other threads:[~2023-03-16  1:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 22:25 Ronak Doshi
2023-03-09  0:34 ` Yunsheng Lin
2023-03-09 22:50   ` Ronak Doshi
2023-03-10  1:02     ` Yunsheng Lin
2023-03-14 21:09       ` Ronak Doshi
2023-03-15  1:51         ` Yunsheng Lin
2023-03-15  2:27           ` Ronak Doshi
2023-03-15  3:04             ` Yunsheng Lin
2023-03-15 23:44               ` Ronak Doshi
2023-03-16  1:47                 ` Yunsheng Lin [this message]
2023-03-16  4:03                   ` Ronak Doshi
2023-03-16  4:13                     ` Jakub Kicinski
2023-03-16  5:21                       ` Ronak Doshi
2023-03-16 20:34                         ` Jakub Kicinski
2023-03-17  2:37                           ` Yunsheng Lin
2023-03-17 20:27                             ` Ronak Doshi
2023-03-18  2:43                               ` Jakub Kicinski
2023-03-23  5:43 Ronak Doshi
2023-03-23 15:48 ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77c30632-849f-8b7b-42ef-be8b32981c15@huawei.com \
    --to=linyunsheng@huawei.com \
    --cc=Pv-drivers@vmware.com \
    --cc=davem@davemloft.net \
    --cc=doshir@vmware.com \
    --cc=edumazet@google.com \
    --cc=gyang@vmware.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®