DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, tingtingx.liao@intel.com,
	Zhichao Zeng <zhichaox.zeng@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Haiyue Wang <haiyue.wang@intel.com>
Subject: [PATCH] net/ice: fix DCF port statistics not cleared
Date: Tue, 31 Oct 2023 15:04:26 +0800	[thread overview]
Message-ID: <20231031070426.843086-1-zhichaox.zeng@intel.com> (raw)

As the kernel driver does not reset the statistics after exiting testpmd,
the previous statistics being retained the next time testpmd is started.

Call 'ice_dcf_stats_reset' during the initialization of the DCF in
order to clear any statistics that may exist from the last use of the DCF
and to avoid statistics errors.

Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization")
Cc: stable@dpdk.org

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 065ec728c2..29699c2c32 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -1937,6 +1937,8 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
 		return -1;
 	}
 
+	ice_dcf_stats_reset(eth_dev);
+
 	dcf_config_promisc(adapter, false, false);
 	return 0;
 }
-- 
2.34.1


             reply	other threads:[~2023-10-31  6:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  7:04 Zhichao Zeng [this message]
2023-11-01  0:51 ` Zhang, Qi Z
2023-11-02  1:50 ` [PATCH v2] " Zhichao Zeng
2023-11-02  4:08   ` 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=20231031070426.843086-1-zhichaox.zeng@intel.com \
    --to=zhichaox.zeng@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=tingtingx.liao@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).