DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/gve: fix Rx no mbufs stats counter update
@ 2023-02-19  0:30 Levend Sayar
  2023-02-19 17:35 ` Stephen Hemminger
  2023-02-20 15:19 ` [PATCH v2] " Levend Sayar
  0 siblings, 2 replies; 26+ messages in thread
From: Levend Sayar @ 2023-02-19  0:30 UTC (permalink / raw)
  To: junfeng.guo; +Cc: dev, Levend Sayar

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 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
index 66fbcf3930..b0427731f8 100644
--- a/drivers/net/gve/gve_rx.c
+++ b/drivers/net/gve/gve_rx.c
@@ -24,6 +24,7 @@ gve_rx_refill(struct gve_rx_queue *rxq)
 				nmb = rte_pktmbuf_alloc(rxq->mpool);
 				if (!nmb)
 					break;
+
 				rxq->sw_ring[idx + i] = nmb;
 			}
 			if (i != nb_alloc) {
@@ -59,9 +60,13 @@ gve_rx_refill(struct gve_rx_queue *rxq)
 				nmb = rte_pktmbuf_alloc(rxq->mpool);
 				if (!nmb)
 					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)


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-02-23 12:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` [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

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).