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

Signed-off-by: Radu Nicolau <radu.nico...@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 4677c69ae8..377d7bc7a6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
 }
 
-- 
2.25.1

Reply via email to