[dpdk-dev,v2] ixgbe: reset hardware stat when initialize
Commit Message
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(+)
Comments
> -----Original Message-----
> From: Qiu, Michael
> Sent: Thursday, June 11, 2015 8:30 AM
> To: dev@dpdk.org
> Cc: Iremonger, Bernard; thomas.monjalon@6wind.com; Qiu, Michael
> Subject: [PATCH v2] ixgbe: reset hardware stat when initialize
>
> 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>
> ---
Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
Hi, all
Any comments on this patch?
Thanks,
Michael
On 6/22/2015 8:47 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Qiu, Michael
>> Sent: Thursday, June 11, 2015 8:30 AM
>> To: dev@dpdk.org
>> Cc: Iremonger, Bernard; thomas.monjalon@6wind.com; Qiu, Michael
>> Subject: [PATCH v2] ixgbe: reset hardware stat when initialize
>>
>> 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>
>> ---
> Acked-by: Bernard Iremonger <Bernard.iremonger@intel.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>
>
> Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
Applied, thanks
@@ -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);