From: Mingjin Ye <mingjinx.ye@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, stable@dpdk.org, yidingx.zhou@intel.com,
Mingjin Ye <mingjinx.ye@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH] net/ice: fix statistics
Date: Thu, 11 May 2023 02:10:55 +0000 [thread overview]
Message-ID: <20230511021055.328986-1-mingjinx.ye@intel.com> (raw)
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
next reply other threads:[~2023-05-11 2:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 2:10 Mingjin Ye [this message]
2023-05-15 1:19 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230511021055.328986-1-mingjinx.ye@intel.com \
--to=mingjinx.ye@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).