Hi David,

I will incorporate your comments in v2.

Thanks,
Gagan

From: David Marchand <david.march...@redhat.com>
Sent: Monday, April 8, 2019 5:06 PM
To: Gagandeep Singh <g.si...@nxp.com>
Cc: dev@dpdk.org; ferruh.yi...@intel.com
Subject: [EXT] Re: [dpdk-dev] [PATCH 05/13] net/enetc: add statistics APIs


On Mon, Apr 8, 2019 at 1:23 PM Gagandeep Singh 
<g.si...@nxp.com<mailto:g.si...@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<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.dpdk.org%2Fdpdk%2Ftree%2Flib%2Flibrte_ethdev%2Frte_ethdev.c%3Fh%3Dv19.05-rc1%23n1969&data=02%7C01%7CG.Singh%40nxp.com%7C803f77a628b944a3118308d6bc165532%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636903201440478754&sdata=Kc5hyTHdcOdAqPOTB%2ByClbzmclebaXJhZXcSMg0Q0RE%3D&reserved=0>


--
David Marchand

Reply via email to