All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Levend Sayar <levendsayar@gmail.com>, junfeng.guo@intel.com
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update
Date: Mon, 20 Feb 2023 22:57:47 +0000	[thread overview]
Message-ID: <520d2dcd-ab57-7097-3218-5965d7399843@amd.com> (raw)
In-Reply-To: <20230220211103.8282-1-levendsayar@gmail.com>

On 2/20/2023 9:11 PM, Levend Sayar wrote:
> rx no_mbufs stats counter update is added for another error case.
> 
> Fixes: 4f6b1dd8240c ("net/gve: support basic statistics")
> Cc: junfeng.guo@intel.com
> 
> Signed-off-by: Levend Sayar <levendsayar@gmail.com>
> ---
>  drivers/net/gve/gve_rx.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
> index 66fbcf3930..d346efa57c 100644
> --- a/drivers/net/gve/gve_rx.c
> +++ b/drivers/net/gve/gve_rx.c
> @@ -61,7 +61,10 @@ gve_rx_refill(struct gve_rx_queue *rxq)
>  					break;
>  				rxq->sw_ring[idx + i] = nmb;
>  			}
> -			nb_alloc = i;
> +			if (i != nb_alloc) {
> +				rxq->no_mbufs += nb_alloc - i;
> +				nb_alloc = i;
> +			}
>  		}
>  		rxq->nb_avail -= nb_alloc;
>  		next_avail += nb_alloc;

Looks good to me,
there was a comment from Stephen to add 'unlikely()', is that issue
resolved?

  parent reply	other threads:[~2023-02-20 22:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19  0:30 [PATCH] net/gve: fix Rx no mbufs stats counter update Levend Sayar
2023-02-19 17:35 ` Stephen Hemminger
2023-02-19 20:43   ` Levend Sayar
2023-02-19 22:59     ` Stephen Hemminger
2023-02-20 15:19 ` [PATCH v2] " Levend Sayar
2023-02-20 21:11   ` [PATCH v3 1/2] " Levend Sayar
2023-02-20 21:11     ` [PATCH v3 2/2] net/gve: add Rx/Tx queue stats as extended stats Levend Sayar
2023-02-20 22:57       ` Ferruh Yigit
2023-02-21 11:11         ` Levend Sayar
2023-02-21 14:13       ` [PATCH v4] " Levend Sayar
2023-02-21 14:18         ` [PATCH v5] " Levend Sayar
2023-02-21 15:58           ` Ferruh Yigit
2023-02-21 16:44             ` Levend Sayar
2023-02-23  2:49               ` Guo, Junfeng
2023-02-23  6:28                 ` Levend Sayar
2023-02-23 11:09                 ` Ferruh Yigit
2023-02-23 12:30                   ` Levend Sayar
2023-02-20 22:57     ` Ferruh Yigit [this message]
2023-02-21 10:07       ` [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update Levend Sayar
2023-02-21 10:30         ` Ferruh Yigit
2023-02-23  4:34           ` Guo, Junfeng
2023-02-23  6:29             ` Levend Sayar
2023-02-23 11:10             ` Ferruh Yigit
2023-02-23 12:29               ` Levend Sayar
2023-02-21 15:58     ` Ferruh Yigit
2023-02-21 16:42       ` Levend Sayar

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=520d2dcd-ab57-7097-3218-5965d7399843@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=levendsayar@gmail.com \
    --cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.