Skip to contentSkip to conversation

net/ice: fix statistics

PATCH Applied Mingjin Ye 2 participants 2 messages May 11, 2023 – May 15, 2023 Network drivers

lore
Share & tools
lore

Mingjin Ye

author
#0 lore raw

PATCH 1/1 net/ice: fix statistics

When the stats_get api is called for the first time in pmd, the offset of the stats register is not recorded. That results in all the obtained count values being 0.

This patch adds reset statistics before dev_init returning. That avoids some noise being counted.

Fixes 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")
---
 drivers/net/ice/ice_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ice/ice_ethdev.c +3 -0
index 9a88cf9796..1116880485 100644
@@ -2440,6 +2440,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 
 	pf->supported_rxdid = ice_get_supported_rxdid(hw);
 
+	/* reset all stats of the device, including pf and main vsi */
+	ice_stats_reset(dev);
+
 	return 0;
 
 err_flow_init:
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: Thursday, May 11, 2023 10:11 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH] net/ice: fix statistics

When the stats_get api is called for the first time in pmd, the offset of the stats register is not recorded. That results in all the obtained count values being 0.

Quoted 7 lines

This patch adds reset statistics before dev_init returning. That avoids some noise being counted.

Fixes 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")

Applied to dpdk-next-net-intel.

Thanks
Qi