patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/mana: fix incorrectly reported counters in stats
@ 2023-02-22 23:27 longli
  2023-03-01  0:15 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: longli @ 2023-02-22 23:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Ajay Sharma, Long Li, stable

From: Long Li <longli@microsoft.com>

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

Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@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


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

* Re: [PATCH] net/mana: fix incorrectly reported counters in stats
  2023-02-22 23:27 [PATCH] net/mana: fix incorrectly reported counters in stats longli
@ 2023-03-01  0:15 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-03-01  0:15 UTC (permalink / raw)
  To: longli; +Cc: dev, Ajay Sharma, Long Li, stable

On 2/22/2023 11:27 PM, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
> 
> For per port counters and we should report summed values from all queues.
> 
> Cc: stable@dpdk.org

    Fixes: e350b56889bb ("net/mana: report queue statistics")
    Cc: stable@dpdk.org

> Signed-off-by: Long Li <longli@microsoft.com>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>


Applied to dpdk-next-net/main, thanks.



It seems this issue commented on v4 [1], fixed in v5 [1], but issue
crept in back in next versions resulting it to be merged.

[1]
https://inbox.dpdk.org/dev/9fc85998-0802-f1f4-fa97-86114a511e76@xilinx.com/

[2]
https://inbox.dpdk.org/dev/1661560509-11009-18-git-send-email-longli@linuxonhyperv.com/

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

end of thread, other threads:[~2023-03-01  0:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 23:27 [PATCH] net/mana: fix incorrectly reported counters in stats longli
2023-03-01  0:15 ` Ferruh Yigit

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