[v2,2/3] net/mvneta: reset stats during device start

Message ID 1560434305-9359-3-git-send-email-lironh@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series net/mvneta: minor updates |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Liron Himi June 13, 2019, 1:58 p.m. UTC
  From: Yuri Chipchev <yuric@marvell.com>

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Tested-by: Yuri Chipchev <yuric@marvell.com>
---
 drivers/net/mvneta/mvneta_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index d6e64a8..f324d93 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -57,6 +57,8 @@  struct mvneta_ifnames {
 
 static int mvneta_dev_num;
 
+static void mvneta_stats_reset(struct rte_eth_dev *dev);
+
 /**
  * Deinitialize packet processor.
  */
@@ -359,6 +361,8 @@  mvneta_dev_start(struct rte_eth_dev *dev)
 	}
 	priv->ppio_id = priv->ppio->port_id;
 
+	mvneta_stats_reset(dev);
+
 	/*
 	 * In case there are some some stale uc/mc mac addresses flush them
 	 * here. It cannot be done during mvneta_dev_close() as port information