Skip to contentSkip to conversation

net/iavf: fix xstats reset

PATCH Applied Radu Nicolau 2 participants 2 messages Nov 9, 2021 – Nov 11, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix xstats reset

Wrong offset used to clear the extended stats section resulting in eth stats not being reset.

Fixes ccb49b834cd7 ("net/iavf: support xstats for inline IPsec crypto")
---
 drivers/net/iavf/iavf_ethdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/iavf/iavf_ethdev.c +2 -3
index 4677c69ae8..377d7bc7a6 100644
@@ -1701,10 +1701,9 @@ static int
 iavf_dev_xstats_reset(struct rte_eth_dev *dev)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-
 	iavf_dev_stats_reset(dev);
-	memset(&vf->vsi.eth_stats_offset, 0, sizeof(struct iavf_eth_xstats));
-
+	memset(&vf->vsi.eth_stats_offset.ips_stats, 0,
+			sizeof(struct iavf_ipsec_crypto_stats));
 	return 0;
 }
 
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Nicolau, Radu <[email protected]>
Sent: Tuesday, November 9, 2021 6:33 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Nicolau, Radu <[email protected]>
Subject: [PATCH] net/iavf: fix xstats reset

Quoted 6 lines

Wrong offset used to clear the extended stats section resulting in eth stats not being reset.

Fixes ccb49b834cd7 ("net/iavf: support xstats for inline IPsec crypto")

Applied to dpdk-next-net-intel.

Thanks
Qi