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: Fri, 10 Mar 2023 09:02:23 +0800 [thread overview]
Message-ID: <252026f5-f979-2c8d-90d9-7ba396d495c8@huawei.com> (raw)
In-Reply-To: <4DF8ED21-92C2-404F-9766-691AEA5C4E8B@vmware.com>
On 2023/3/10 6:50, Ronak Doshi wrote:
>
> > > On 3/8/23, 4:34 PM, "Yunsheng Lin" <linyunsheng@huawei.com <mailto:linyunsheng@huawei.com>> wrote:
>>>
>>> - if (adapter->netdev->features & NETIF_F_LRO)
>>> + /* Use GRO callback if UPT is enabled */
>>> + if ((adapter->netdev->features & NETIF_F_LRO) && !rq->shared->updateRxProd)
>>>
>>>
>> If UPT devicve does not support LRO, why not just clear the NETIF_F_LRO from
>> adapter->netdev->features?
>>
>>
>> With above change, it seems that LRO is supported for user' POV, but the GRO
>> is actually being done.
>>
>>
>> Also, if NETIF_F_LRO is set, do we need to clear the NETIF_F_GRO bit, so that
>> there is no confusion for user?
>
> We cannot clear LRO bit as the virtual nic can run in either emulation or UPT mode.
> When the vnic switches the mode between UPT and emulation, the guest vm is not
> notified. Hence, we use updateRxProd which is shared in datapath to check what mode
> is being run.
So it is a run time thing? What happens if some LRO'ed packet is put in the rx queue,
and the the vnic switches the mode to UPT, is it ok for those LRO'ed packets to go through
the software GSO processing? If yes, why not just call napi_gro_receive() for LRO case too?
Looking closer, it seems vnic is implementing hw GRO from driver' view, as the driver is
setting skb_shinfo(skb)->gso_* accordingly:
https://elixir.bootlin.com/linux/latest/source/drivers/net/vmxnet3/vmxnet3_drv.c#L1665
In that case, you may call napi_gro_receive() for those GRO'ed skb too, see:
https://lore.kernel.org/netdev/166479721495.20474.5436625882203781290.git-patchwork-notify@kernel.org/T/
>
> Also, we plan to add an event to notify the guest about this but that is for separate patch
> and may take some time.
>
> Thanks,
> Ronak
>
next prev parent reply other threads:[~2023-03-10 1:02 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 [this message]
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
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=252026f5-f979-2c8d-90d9-7ba396d495c8@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®