net/mvneta: reset stats during device init
authorYuri Chipchev <yuric@marvell.com>
Mon, 1 Jul 2019 08:00:23 +0000 (11:00 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 3 Jul 2019 10:57:30 +0000 (12:57 +0200)
reset device statistics on device initialization

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

index d6e64a8..f324d93 100644 (file)
@@ -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