[dpdk-dev] [PATCH 05/13] net/enetc: add statistics APIs
David Marchand
david.marchand at redhat.com
Mon Apr 8 13:35:30 CEST 2019
On Mon, Apr 8, 2019 at 1:23 PM Gagandeep Singh <G.Singh at nxp.com> wrote:
> +static
> +int enetc_stats_get(struct rte_eth_dev *dev,
> + struct rte_eth_stats *stats)
> +{
> + struct enetc_eth_hw *hw =
> + ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> + struct enetc_hw *enetc_hw = &hw->hw;
> +
> + if (stats == NULL)
> + return -1;
>
+
> + memset(stats, 0, sizeof(struct rte_eth_stats));
>
Both the check and the memset are unneeded.
https://git.dpdk.org/dpdk/tree/lib/librte_ethdev/rte_ethdev.c?h=v19.05-rc1#n1969
--
David Marchand
More information about the dev
mailing list