From: Michael Qiu <michael.qiu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] ixgbe: reset hardware stat when initialize
Date: Thu, 11 Jun 2015 15:29:52 +0800 [thread overview]
Message-ID: <1434007792-7898-1-git-send-email-michael.qiu@intel.com> (raw)
In-Reply-To: <1431072861-28565-1-git-send-email-qiudayu@cn.ibm.com>
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 <michael.qiu@intel.com>
---
Change log:
v2 --> v1:
change the folder of driver
drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0d9f9b2..e0415a7 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -840,6 +840,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);
@@ -1012,6 +1015,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);
--
1.9.3
next prev parent reply other threads:[~2015-06-11 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431072861-28565-1-git-send-email-qiudayu@cn.ibm.com>
2015-05-20 9:35 ` [dpdk-dev] [PATCH] " Qiu, Michael
2015-06-11 7:29 ` Michael Qiu [this message]
2015-06-22 12:47 ` [dpdk-dev] [PATCH v2] " Iremonger, Bernard
2015-07-02 11:54 ` Qiu, Michael
2015-07-10 15:52 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434007792-7898-1-git-send-email-michael.qiu@intel.com \
--to=michael.qiu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).