[dpdk-dev] [PATCH] stats: remove useless memset's

David Marchand david.marchand at 6wind.com
Wed Jan 21 14:08:02 CET 2015


Hello Stephen,

On Wed, Jan 21, 2015 at 5:16 AM, <stephen at networkplumber.org> wrote:

> From: Stephen Hemminger <shemming at brocade.com>
>
> The rte_eth_stats_get is the only API that should call the device
> statistics function directly, and it already does a memset of the
> resulting structure. Therefore doing memset() in the driver is
> redundant and should be removed.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>  lib/librte_pmd_af_packet/rte_eth_af_packet.c | 2 --
>  lib/librte_pmd_bond/rte_eth_bond_pmd.c       | 4 ----
>  lib/librte_pmd_enic/enic_main.c              | 1 -
>  lib/librte_pmd_i40e/i40e_ethdev_vf.c         | 1 -
>  lib/librte_pmd_ixgbe/ixgbe_ethdev.c          | 1 -
>  lib/librte_pmd_ring/rte_eth_ring.c           | 1 -
>  6 files changed, 10 deletions(-)
>

I think you missed some :
- lib/librte_pmd_e1000/igb_ethdev.c function eth_igbvf_stats_get()
- lib/librte_pmd_pcap/rte_eth_pcap.c function eth_stats_get()

With these fixed :
Acked-By: David Marchand <david.marchand at 6wind.com>

-- 
David Marchand


More information about the dev mailing list