From: Michael Qiu Date: Thu, 11 Jun 2015 07:29:52 +0000 (+0800) Subject: ixgbe: reset hardware stats on initialization X-Git-Tag: spdx-start~8791 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b911281be641ff3822bf9983a7cd68f3bbaa291b;p=dpdk.git ixgbe: reset hardware stats on initialization When initialize the hardware, the stat should be reset. Otherwise when detach then attach port, the stat will not be re-init to zero. Signed-off-by: Michael Qiu Acked-by: Bernard Iremonger --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 4015febcfa..aa6074fda2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -866,6 +866,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) return -EIO; } + /* Reset the hw statistics */ + ixgbe_dev_stats_reset(eth_dev); + /* disable interrupt */ ixgbe_disable_intr(hw); @@ -1038,6 +1041,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) /* init_mailbox_params */ hw->mbx.ops.init_params(hw); + /* Reset the hw statistics */ + ixgbevf_dev_stats_reset(eth_dev); + /* Disable the interrupts for VF */ ixgbevf_intr_disable(hw);