stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Ronak Doshi <doshir@vmware.com>
Cc: netdev@vger.kernel.org, stable@vger.kernel.org,
	VMware PV-Drivers Reviewers <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, 23 Mar 2023 16:48:24 +0100	[thread overview]
Message-ID: <ZBx0yD9FkEVwZ8oI@corigine.com> (raw)
In-Reply-To: <20230323054322.24938-1-doshir@vmware.com>

On Wed, Mar 22, 2023 at 10:43:19PM -0700, 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.
> 
> To clarify few things discussed over the thread:
> The patch is not neglecting any feature bits nor disabling GRO. It uses
> GRO callback when UPT is active as LRO is not available in UPT.
> GRO callback cannot be used as default for all cases as it degrades
> performance for non-UPT cases or for cases when LRO is already done in
> ESXi.
> 
> Cc: stable@vger.kernel.org
> Fixes: 6f91f4ba046e ("vmxnet3: add support for capability registers")
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
> Acked-by: Guolin Yang <gyang@vmware.com>

Reviewed-by: Simon Horman <simon.horman@corigine.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)

nit: this could be two lines, fitting into 80 columns

>  				netif_receive_skb(skb);
>  			else
>  				napi_gro_receive(&rq->napi, skb);
> -- 
> 2.11.0
> 

  reply	other threads:[~2023-03-23 15:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  5:43 [PATCH net] vmxnet3: use gro callback when UPT is enabled Ronak Doshi
2023-03-23 15:48 ` Simon Horman [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
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

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=ZBx0yD9FkEVwZ8oI@corigine.com \
    --to=simon.horman@corigine.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=pv-drivers@vmware.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;
as well as URLs for NNTP newsgroup(s).