[PATCH v2] net/iavf: fix port stats not cleared

Zhang, Qi Z qi.z.zhang at intel.com
Mon Sep 11 02:42:52 CEST 2023



> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou at intel.com>
> Sent: Thursday, September 7, 2023 10:40 AM
> To: dev at dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou at intel.com>; stable at dpdk.org; Xu, KuanX
> <kuanx.xu at intel.com>
> Subject: [PATCH v2] net/iavf: fix port stats not cleared
>
> After VF reset, kernel driver may reuse the orignal VSI without reset its stats.
> Call 'iavf_dev_stats_reset' during the initialization of the VF in order to clear
> any statistics that may exist from the last use of the VF and to avoid statistics
> errors.
>
> Fixes: 22b123a36d07 ("net/avf: initialize PMD")
> Cc: stable at dpdk.org
>
> Signed-off-by: Kuan Xu <kuanx.xu at intel.com>
> Signed-off-by: Yiding Zhou <yidingx.zhou at intel.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index f2fc5a5621..24c6342dee 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -2721,6 +2721,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
>
>       iavf_default_rss_disable(adapter);
>
> +     iavf_dev_stats_reset(eth_dev);
>
>       /* Start device watchdog */
>       iavf_dev_watchdog_enable(adapter);
> --
> 2.34.1

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

Applied to dpdk-next-net-intel.

Thanks
Qi



More information about the stable mailing list