[v2,09/10] net/cnxk: fix xstats reset

Message ID 20240528070522.3857626-9-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,01/10] common/cnxk: sync VF root weight with kernel |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram May 28, 2024, 7:05 a.m. UTC
From: Sunil Kumar Kori <skori@marvell.com>

Currently only NIX stats are cleared during xstats
reset and CGX stats are left as it is.

Clearing CGX stats too during xstats reset.

Fixes: 8075b057b620 ("net/cnxk: support extended statistics")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_stats.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/cnxk/cnxk_stats.c b/drivers/net/cnxk/cnxk_stats.c
index f2f2222c89..469faff405 100644
--- a/drivers/net/cnxk/cnxk_stats.c
+++ b/drivers/net/cnxk/cnxk_stats.c
@@ -316,6 +316,8 @@  cnxk_nix_xstats_reset(struct rte_eth_dev *eth_dev)
 			goto exit;
 	}
 
+	/* Reset MAC stats */
+	rc = roc_nix_mac_stats_reset(nix);
 exit:
 	return rc;
 }