net/mlx5: remove flags setting from flow preparation
[dpdk.git] / drivers / net / bnxt / bnxt_ethdev.c
index 0bc8c50..801c6ff 100644 (file)
@@ -202,7 +202,9 @@ static int bnxt_init_chip(struct bnxt *bp)
        struct bnxt_rx_queue *rxq;
        struct rte_eth_link new;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);
+       struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
        struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       uint64_t rx_offloads = dev_conf->rxmode.offloads;
        uint32_t intr_vector = 0;
        uint32_t queue_id, base = BNXT_MISC_VEC_ID;
        uint32_t vec = BNXT_MISC_VEC_ID;
@@ -283,6 +285,16 @@ static int bnxt_init_chip(struct bnxt *bp)
                        }
                }
 
+               /*
+                * Firmware sets pf pair in default vnic cfg. If the VLAN strip
+                * setting is not available at this time, it will not be
+                * configured correctly in the CFA.
+                */
+               if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+                       vnic->vlan_strip = true;
+               else
+                       vnic->vlan_strip = false;
+
                rc = bnxt_hwrm_vnic_cfg(bp, vnic);
                if (rc) {
                        PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n",
@@ -3489,10 +3501,6 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
        bnxt_disable_int(bp);
        bnxt_free_int(bp);
        bnxt_free_mem(bp);
-       if (eth_dev->data->mac_addrs != NULL) {
-               rte_free(eth_dev->data->mac_addrs);
-               eth_dev->data->mac_addrs = NULL;
-       }
        if (bp->grp_info != NULL) {
                rte_free(bp->grp_info);
                bp->grp_info = NULL;
@@ -3530,7 +3538,11 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
 static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
 {
-       return rte_eth_dev_pci_generic_remove(pci_dev, bnxt_dev_uninit);
+       if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+               return rte_eth_dev_pci_generic_remove(pci_dev,
+                               bnxt_dev_uninit);
+       else
+               return rte_eth_dev_pci_generic_remove(pci_dev, NULL);
 }
 
 static struct rte_pci_driver bnxt_rte_pmd = {
@@ -3557,7 +3569,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
 
 RTE_INIT(bnxt_init_log)
 {
-       bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver");
+       bnxt_logtype_driver = rte_log_register("pmd.net.bnxt.driver");
        if (bnxt_logtype_driver >= 0)
                rte_log_set_level(bnxt_logtype_driver, RTE_LOG_INFO);
 }