net/iavf: fix port stats not cleared
PATCH 1/1 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.
--- drivers/net/iavf/iavf_ethdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/iavf/iavf_ethdev.c +1 -0
@@ -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);
Signature · 1 line
2.34.1
Quoted 7 lines
-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: 2023年8月30日 14:55
To: [email protected]
Cc: Zhou, YidingX <[email protected]>; [email protected]; Xu, KuanX <[email protected]>
Subject: [PATCH] net/iavf: fix port stats not cleared
Quoted 8 lines
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")Signed-off-by Kuan Xu <[email protected]>Signed-off-by Yiding Zhou <[email protected]>
PATCH v2 1/1 net/iavf: fix port stats not cleared
In reply to Yiding ZhouAfter 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.
--- drivers/net/iavf/iavf_ethdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/iavf/iavf_ethdev.c +1 -0
@@ -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);
Signature · 1 line
2.34.1
Quoted 37 lines
-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Thursday, September 7, 2023 10:40 AM
To: [email protected]
Cc: Zhou, YidingX <[email protected]>; [email protected]; Xu, KuanX <[email protected]>
Subject: [PATCH v2] net/iavf: fix port stats not clearedAfter 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")Signed-off-by Kuan Xu <[email protected]>Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 1 + 1 file changed, 1 insertion(+)drivers/net/iavf/iavf_ethdev.c +1
-1@@ -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); --
Quoted 1 line
2.34.1
Applied to dpdk-next-net-intel.
Thanks
Qi