net/ena/base: remove conversion of indirection table
[dpdk.git] / drivers / net / bnx2x / bnx2x_ethdev.c
index 07168e9..7864b5b 100644 (file)
@@ -320,7 +320,7 @@ bnx2x_promisc_disable(struct rte_eth_dev *dev)
        return 0;
 }
 
-static void
+static int
 bnx2x_dev_allmulticast_enable(struct rte_eth_dev *dev)
 {
        struct bnx2x_softc *sc = dev->data->dev_private;
@@ -330,9 +330,11 @@ bnx2x_dev_allmulticast_enable(struct rte_eth_dev *dev)
        if (rte_eth_promiscuous_get(dev->data->port_id) == 1)
                sc->rx_mode = BNX2X_RX_MODE_ALLMULTI_PROMISC;
        bnx2x_set_rx_mode(sc);
+
+       return 0;
 }
 
-static void
+static int
 bnx2x_dev_allmulticast_disable(struct rte_eth_dev *dev)
 {
        struct bnx2x_softc *sc = dev->data->dev_private;
@@ -342,6 +344,8 @@ bnx2x_dev_allmulticast_disable(struct rte_eth_dev *dev)
        if (rte_eth_promiscuous_get(dev->data->port_id) == 1)
                sc->rx_mode = BNX2X_RX_MODE_PROMISC;
        bnx2x_set_rx_mode(sc);
+
+       return 0;
 }
 
 static int
@@ -594,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 
        eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops;
 
+       if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+               PMD_DRV_LOG(ERR, sc, "Skipping device init from secondary process");
+               return 0;
+       }
+
        rte_eth_copy_pci_info(eth_dev, pci_dev);
 
        sc->pcie_bus    = pci_dev->addr.bus;