net/nfp: fix stats struct initial value
[dpdk.git] / drivers / net / nfp / nfp_net.c
index e9001f4..0501156 100644 (file)
@@ -1038,6 +1038,8 @@ nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
        /* RTE_ETHDEV_QUEUE_STAT_CNTRS default value is 16 */
 
+       memset(&nfp_dev_stats, 0, sizeof(nfp_dev_stats));
+
        /* reading per RX ring stats */
        for (i = 0; i < dev->data->nb_rx_queues; i++) {
                if (i == RTE_ETHDEV_QUEUE_STAT_CNTRS)
@@ -3029,7 +3031,7 @@ static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev)
                hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
        }
        /* hotplug is not possible with multiport PF */
-       if (!hw->pf_multiport_enabled)
+       if (hw->pf_multiport_enabled)
                return -ENOTSUP;
        return rte_eth_dev_pci_generic_remove(pci_dev, NULL);
 }