patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix port stats not cleared
@ 2023-08-30  6:54 Yiding Zhou
  2023-09-05  8:06 ` Liao, TingtingX
  2023-09-07  2:39 ` [PATCH v2] " Yiding Zhou
  0 siblings, 2 replies; 4+ messages in thread
From: Yiding Zhou @ 2023-08-30  6:54 UTC (permalink / raw)
  To: dev; +Cc: Yiding Zhou, stable, Kuan Xu

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(+)

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


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

* RE: [PATCH] net/iavf: fix port stats not cleared
  2023-08-30  6:54 [PATCH] net/iavf: fix port stats not cleared Yiding Zhou
@ 2023-09-05  8:06 ` Liao, TingtingX
  2023-09-07  2:39 ` [PATCH v2] " Yiding Zhou
  1 sibling, 0 replies; 4+ messages in thread
From: Liao, TingtingX @ 2023-09-05  8:06 UTC (permalink / raw)
  To: Zhou, YidingX, dev; +Cc: Zhou, YidingX, stable, Xu, KuanX

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



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

* [PATCH v2] net/iavf: fix port stats not cleared
  2023-08-30  6:54 [PATCH] net/iavf: fix port stats not cleared Yiding Zhou
  2023-09-05  8:06 ` Liao, TingtingX
@ 2023-09-07  2:39 ` Yiding Zhou
  2023-09-11  0:42   ` Zhang, Qi Z
  1 sibling, 1 reply; 4+ messages in thread
From: Yiding Zhou @ 2023-09-07  2:39 UTC (permalink / raw)
  To: dev; +Cc: Yiding Zhou, stable, Kuan Xu

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@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(+)

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


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

* RE: [PATCH v2] net/iavf: fix port stats not cleared
  2023-09-07  2:39 ` [PATCH v2] " Yiding Zhou
@ 2023-09-11  0:42   ` Zhang, Qi Z
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-09-11  0:42 UTC (permalink / raw)
  To: Zhou, YidingX, dev; +Cc: Zhou, YidingX, stable, Xu, KuanX



> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou@intel.com>
> Sent: Thursday, September 7, 2023 10:40 AM
> To: dev@dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; stable@dpdk.org; Xu, KuanX
> <kuanx.xu@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@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(+)
>
> 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@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-09-11  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30  6:54 [PATCH] net/iavf: fix port stats not cleared Yiding Zhou
2023-09-05  8:06 ` Liao, TingtingX
2023-09-07  2:39 ` [PATCH v2] " Yiding Zhou
2023-09-11  0:42   ` 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).