From: Intel Date: Wed, 18 Sep 2013 10:00:00 +0000 (+0200) Subject: ixgbe: fix VF init without setup X-Git-Tag: spdx-start~11144 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0105ba4c6b804231d40110f295ae191e81207a26;p=dpdk.git ixgbe: fix VF init without setup In case of multi-process application, the secondary process can initialize the driver without configuring queues. In this case the Rx/Tx functions were not initialized because it was only done in queue setup. Fix by reproducing the same behaviour as in eth_ixgbe_dev_init(). Signed-off-by: Intel --- diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index e0350d6ab5..bc24187900 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -732,6 +732,18 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, PMD_INIT_LOG(DEBUG, "eth_ixgbevf_dev_init"); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; + eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; + + /* for secondary processes, we don't initialise any further as primary + * has already done this work. Only check we don't need a different + * RX function */ + if (rte_eal_process_type() != RTE_PROC_PRIMARY){ + if (eth_dev->data->scattered_rx) + eth_dev->rx_pkt_burst = ixgbe_recv_scattered_pkts; + return 0; + } + pci_dev = eth_dev->pci_dev; hw->device_id = pci_dev->id.device_id;