DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix statistics
@ 2023-05-11  2:10 Mingjin Ye
  2023-05-15  1:19 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Mingjin Ye @ 2023-05-11  2:10 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, stable, yidingx.zhou, Mingjin Ye, Qi Zhang

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")
Cc: stable@dpdk.org

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9a88cf9796..1116880485 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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:
-- 
2.25.1


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

* RE: [PATCH] net/ice: fix statistics
  2023-05-11  2:10 [PATCH] net/ice: fix statistics Mingjin Ye
@ 2023-05-15  1:19 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2023-05-15  1:19 UTC (permalink / raw)
  To: Ye, MingjinX, dev; +Cc: Yang, Qiming, stable, Zhou, YidingX



> -----Original Message-----
> From: Ye, MingjinX <mingjinx.ye@intel.com>
> Sent: Thursday, May 11, 2023 10:11 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org; Zhou, YidingX
> <yidingx.zhou@intel.com>; Ye, MingjinX <mingjinx.ye@intel.com>; Zhang, Qi
> Z <qi.z.zhang@intel.com>
> 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.
> 
> This patch adds reset statistics before dev_init returning. That avoids some
> noise being counted.
> 
> Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


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

end of thread, other threads:[~2023-05-15  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11  2:10 [PATCH] net/ice: fix statistics Mingjin Ye
2023-05-15  1:19 ` Zhang, Qi Z

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