[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3768ae9-6a2b-3b5e-9381-21407f96dd63@huawei.com>
Date: Thu, 9 Mar 2023 08:34:05 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Ronak Doshi <doshir@...are.com>, <netdev@...r.kernel.org>
CC: <stable@...r.kernel.org>,
VMware PV-Drivers Reviewers <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/9 6:25, Ronak Doshi wrote:
> Currently, vmxnet3 uses GRO callback only if LRO is disabled. However,
> on smartNic based setups where UPT is supported, LRO can be enabled
> from guest VM but UPT devicve does not support LRO as of now. In such
> cases, there can be performance degradation as GRO is not being done.
>
> This patch fixes this issue by calling GRO API when UPT is enabled. We
> use updateRxProd to determine if UPT mode is active or not.
>
> Cc: stable@...r.kernel.org
> Fixes: 6f91f4ba046e ("vmxnet3: add support for capability registers")
> Signed-off-by: Ronak Doshi <doshir@...are.com>
> Acked-by: Guolin Yang <gyang@...are.com>
> ---
> drivers/net/vmxnet3/vmxnet3_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index 682987040ea8..8f7ac7d85afc 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -1688,7 +1688,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
> if (unlikely(rcd->ts))
> __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci);
>
> - 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?
> netif_receive_skb(skb);
> else
> napi_gro_receive(&rq->napi, skb);
>
Powered by blists - more mailing lists