DPDK patches and discussions
 help / color / mirror / Atom feed
From: Levend Sayar <levendsayar@gmail.com>
To: junfeng.guo@intel.com
Cc: dev@dpdk.org, Levend Sayar <levendsayar@gmail.com>
Subject: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update
Date: Tue, 21 Feb 2023 00:11:01 +0300	[thread overview]
Message-ID: <20230220211103.8282-1-levendsayar@gmail.com> (raw)
In-Reply-To: <20230220151936.2716-1-levendsayar@gmail.com>

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;
-- 
2.37.1 (Apple Git-137.1)


  reply	other threads:[~2023-02-20 21:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19  0:30 [PATCH] " 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   ` Levend Sayar [this message]
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     ` [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update Ferruh Yigit
2023-02-21 10:07       ` 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=20230220211103.8282-1-levendsayar@gmail.com \
    --to=levendsayar@gmail.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    /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).