patch 'net/mana: fix stats counters' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:23:44 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/5475d251f17b88d7353956d9a9be958cb773fcf1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5475d251f17b88d7353956d9a9be958cb773fcf1 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Wed, 22 Feb 2023 15:27:24 -0800
Subject: [PATCH] net/mana: fix stats counters
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit eb6f507afed56915fec7b9e5da3389eb5853ab10 ]

For per port counters and we should report summed values from all
queues.

Fixes: e350b56889bb ("net/mana: report queue statistics")

Signed-off-by: Long Li <longli at microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/mana/mana.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 43221e743e..8a782c0d63 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -616,9 +616,9 @@ mana_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		if (!txq)
 			continue;
 
-		stats->opackets = txq->stats.packets;
-		stats->obytes = txq->stats.bytes;
-		stats->oerrors = txq->stats.errors;
+		stats->opackets += txq->stats.packets;
+		stats->obytes += txq->stats.bytes;
+		stats->oerrors += txq->stats.errors;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 			stats->q_opackets[i] = txq->stats.packets;
@@ -633,9 +633,9 @@ mana_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		if (!rxq)
 			continue;
 
-		stats->ipackets = rxq->stats.packets;
-		stats->ibytes = rxq->stats.bytes;
-		stats->ierrors = rxq->stats.errors;
+		stats->ipackets += rxq->stats.packets;
+		stats->ibytes += rxq->stats.bytes;
+		stats->ierrors += rxq->stats.errors;
 
 		/* There is no good way to get stats->imissed, not setting it */
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:39.720847100 +0800
+++ 0036-net-mana-fix-stats-counters.patch	2023-04-09 21:45:38.619042200 +0800
@@ -1 +1 @@
-From eb6f507afed56915fec7b9e5da3389eb5853ab10 Mon Sep 17 00:00:00 2001
+From 5475d251f17b88d7353956d9a9be958cb773fcf1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit eb6f507afed56915fec7b9e5da3389eb5853ab10 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list