> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.z...@intel.com>
> Sent: Tuesday, October 31, 2023 3:04 PM
> To: dev@dpdk.org
> Cc: sta...@dpdk.org; Liao, TingtingX <tingtingx.l...@intel.com>; Zeng,
> ZhichaoX <zhichaox.z...@intel.com>; Yang, Qiming
> <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; Wang,
> Haiyue <haiyue.w...@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: sta...@dpdk.org
> 
> Signed-off-by: Zhichao Zeng <zhichaox.z...@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 via email to