Any comments about this patch?

Thanks,
Michael

On 5/8/2015 4:14 PM, Michael Qiu wrote:
> From: Michael Qiu <michael.qiu at 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 at intel.com>
> ---
>  lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c 
> b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> index 1b3b4b5..dbcc12a 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> +++ b/lib/librte_pmd_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);
>  
> @@ -1015,6 +1018,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
>       /* Disable the interrupts for VF */
>       ixgbevf_intr_disable(hw);
>  
> +     /* Reset the hw statistics */
> +     ixgbevf_dev_stats_reset(eth_dev);
> +
>       hw->mac.num_rar_entries = 128; /* The MAX of the underlying PF */
>       diag = hw->mac.ops.reset_hw(hw);
>  

Reply via email to