From: Long Li <lon...@microsoft.com>

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

Cc: sta...@dpdk.org
Signed-off-by: Long Li <lon...@microsoft.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.32.0

Reply via email to