net/ice/base: use package info from ice segment metadata
[dpdk.git] / drivers / net / ixgbe / ixgbe_ethdev.c
index 6f9a1f7..913c453 100644 (file)
@@ -33,7 +33,7 @@
 #include <rte_random.h>
 #include <rte_dev.h>
 #include <rte_hash_crc.h>
-#ifdef RTE_LIBRTE_SECURITY
+#ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
 #endif
 
@@ -1077,7 +1077,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
                IXGBE_DEV_PRIVATE_TO_BW_CONF(eth_dev->data->dev_private);
        uint32_t ctrl_ext;
        uint16_t csum;
-       int diag, i;
+       int diag, i, ret;
 
        PMD_INIT_FUNC_TRACE();
 
@@ -1118,6 +1118,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
        rte_atomic32_clear(&ad->link_thread_running);
        rte_eth_copy_pci_info(eth_dev, pci_dev);
+       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        /* Vendor and Device ID need to be set before init of shared code */
        hw->device_id = pci_dev->id.device_id;
@@ -1151,7 +1152,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        /* Unlock any pending hardware semaphore */
        ixgbe_swfw_lock_reset(hw);
 
-#ifdef RTE_LIBRTE_SECURITY
+#ifdef RTE_LIB_SECURITY
        /* Initialize security_ctx only for primary process*/
        if (ixgbe_ipsec_ctx_create(eth_dev))
                return -ENOMEM;
@@ -1255,7 +1256,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        memset(hwstrip, 0, sizeof(*hwstrip));
 
        /* initialize PF if max_vfs not zero */
-       ixgbe_pf_host_init(eth_dev);
+       ret = ixgbe_pf_host_init(eth_dev);
+       if (ret) {
+               rte_free(eth_dev->data->mac_addrs);
+               eth_dev->data->mac_addrs = NULL;
+               rte_free(eth_dev->data->hash_mac_addrs);
+               eth_dev->data->hash_mac_addrs = NULL;
+               return ret;
+       }
 
        ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
        /* let hardware know driver is loaded */
@@ -1596,6 +1604,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
                              pci_dev->device.devargs);
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
+       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->device_id = pci_dev->id.device_id;
        hw->vendor_id = pci_dev->id.vendor_id;
@@ -3052,7 +3061,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
        /* Remove all Traffic Manager configuration */
        ixgbe_tm_conf_uninit(dev);
 
-#ifdef RTE_LIBRTE_SECURITY
+#ifdef RTE_LIB_SECURITY
        rte_free(dev->security_ctx);
 #endif