DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix DCF port statistics not cleared
@ 2023-10-31  7:04 Zhichao Zeng
  2023-11-01  0:51 ` Zhang, Qi Z
  2023-11-02  1:50 ` [PATCH v2] " Zhichao Zeng
  0 siblings, 2 replies; 4+ messages in thread
From: Zhichao Zeng @ 2023-10-31  7:04 UTC (permalink / raw)
  To: dev
  Cc: stable, tingtingx.liao, Zhichao Zeng, Qiming Yang, Qi Zhang, Haiyue Wang

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


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

* RE: [PATCH] net/ice: fix DCF port statistics not cleared
  2023-10-31  7:04 [PATCH] net/ice: fix DCF port statistics not cleared Zhichao Zeng
@ 2023-11-01  0:51 ` Zhang, Qi Z
  2023-11-02  1:50 ` [PATCH v2] " Zhichao Zeng
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-11-01  0:51 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev; +Cc: stable, Liao, TingtingX, Yang, Qiming



> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Tuesday, October 31, 2023 3:04 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Liao, TingtingX <tingtingx.liao@intel.com>; Zeng,
> ZhichaoX <zhichaox.zeng@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang,
> Haiyue <haiyue.wang@intel.com>
> Subject: [PATCH] net/ice: fix DCF port statistics not cleared
> 
> As the kernel driver does not reset the statistics after exiting testpmd, the
> previous statistics being retained the next time testpmd is started.

Please describe the issue in general but not testpmd specific.

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


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

* [PATCH v2] net/ice: fix DCF port statistics not cleared
  2023-10-31  7:04 [PATCH] net/ice: fix DCF port statistics not cleared Zhichao Zeng
  2023-11-01  0:51 ` Zhang, Qi Z
@ 2023-11-02  1:50 ` Zhichao Zeng
  2023-11-02  4:08   ` Zhang, Qi Z
  1 sibling, 1 reply; 4+ messages in thread
From: Zhichao Zeng @ 2023-11-02  1:50 UTC (permalink / raw)
  To: dev
  Cc: stable, tingtingx.liao, Zhichao Zeng, Qiming Yang, Qi Zhang, Haiyue Wang

Call 'ice_dcf_stats_reset' during the initialization of the DCF port 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>

---
v2: modify git log
---
 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


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

* RE: [PATCH v2] net/ice: fix DCF port statistics not cleared
  2023-11-02  1:50 ` [PATCH v2] " Zhichao Zeng
@ 2023-11-02  4:08   ` Zhang, Qi Z
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-11-02  4:08 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev; +Cc: stable, Liao, TingtingX, Yang, Qiming, Wang, Haiyue



> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Thursday, November 2, 2023 9:51 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Liao, TingtingX <tingtingx.liao@intel.com>; Zeng,
> ZhichaoX <zhichaox.zeng@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang,
> Haiyue <haiyue.wang@intel.com>
> Subject: [PATCH v2] net/ice: fix DCF port statistics not cleared
> 
> Call 'ice_dcf_stats_reset' during the initialization of the DCF port 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>

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

Applied to dpdk-next-net-intel.

Thanks
Qi


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

end of thread, other threads:[~2023-11-02  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31  7:04 [PATCH] net/ice: fix DCF port statistics not cleared Zhichao Zeng
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

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