ethdev: fix VLAN offloads set if no relative capabilities
[dpdk.git] / drivers / net / nfp / nfp_net.c
index bce4d96..474719b 100644 (file)
@@ -2353,11 +2353,6 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
        hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        new_ctrl = 0;
 
-       if ((mask & ETH_VLAN_FILTER_OFFLOAD) ||
-           (mask & ETH_VLAN_EXTEND_OFFLOAD))
-               PMD_DRV_LOG(INFO, "No support for ETH_VLAN_FILTER_OFFLOAD or"
-                       " ETH_VLAN_EXTEND_OFFLOAD");
-
        /* Enable vlan strip if it is not configured yet */
        if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
            !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
@@ -3451,9 +3446,10 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
 probe_failed:
        rte_free(port_name);
        /* free ports private data if primary process */
-       if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+       if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
                rte_free(eth_dev->data->dev_private);
-
+               eth_dev->data->dev_private = NULL;
+       }
        rte_eth_dev_release_port(eth_dev);
 
        return retval;
@@ -3682,9 +3678,6 @@ error:
        return ret;
 }
 
-int nfp_logtype_init;
-int nfp_logtype_driver;
-
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
        {
                RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
@@ -3768,16 +3761,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-
-RTE_INIT(nfp_init_log)
-{
-       nfp_logtype_init = rte_log_register("pmd.net.nfp.init");
-       if (nfp_logtype_init >= 0)
-               rte_log_set_level(nfp_logtype_init, RTE_LOG_NOTICE);
-       nfp_logtype_driver = rte_log_register("pmd.net.nfp.driver");
-       if (nfp_logtype_driver >= 0)
-               rte_log_set_level(nfp_logtype_driver, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
+RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"