net/mana: fix incorrectly reported counters in stats
PATCH 1/1 net/mana: fix incorrectly reported counters in stats
From: Long Li <[email protected]>
For per port counters and we should report summed values from all queues.
Signed-off-by Long Li <[email protected]>
--- drivers/net/mana/mana.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/mana/mana.c +6 -6
@@ -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 */
Signature · 1 line
2.32.0
Quoted 5 lines · On 2/22/2023 11:27 PM, [email protected] wrote:
From: Long Li <[email protected]>
For per port counters and we should report summed values from all queues.
Fixes: e350b56889bb ("net/mana: report queue statistics")
Cc: [email protected]Quoted 1 line
Signed-off-by Long Li <[email protected]>
Acked-by Ferruh Yigit <[email protected]>
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.