net/iavf: fix port stats not cleared
Checks
Commit Message
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@dpdk.org
Signed-off-by: Kuan Xu <kuanx.xu@intel.com>
Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 1 +
1 file changed, 1 insertion(+)
Comments
> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou@intel.com>
> Sent: 2023年8月30日 14:55
> To: dev@dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; stable@dpdk.org; Xu, KuanX <kuanx.xu@intel.com>
> Subject: [PATCH] net/iavf: fix port stats not cleared
>
> 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@dpdk.org
>
> Signed-off-by: Kuan Xu <kuanx.xu@intel.com>
> Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
>
Tested-by: Tingting Liao <tingtingx.liao@intel.com>
@@ -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);