igb: 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_igb_dev_init(). Signed-off-by: Intel
This commit is contained in:
parent
a84f185a8a
commit
5caeb1b143
@ -471,6 +471,18 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
|
|||||||
PMD_INIT_LOG(DEBUG, "eth_igbvf_dev_init");
|
PMD_INIT_LOG(DEBUG, "eth_igbvf_dev_init");
|
||||||
|
|
||||||
eth_dev->dev_ops = &igbvf_eth_dev_ops;
|
eth_dev->dev_ops = &igbvf_eth_dev_ops;
|
||||||
|
eth_dev->rx_pkt_burst = ð_igb_recv_pkts;
|
||||||
|
eth_dev->tx_pkt_burst = ð_igb_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 = ð_igb_recv_scattered_pkts;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pci_dev = eth_dev->pci_dev;
|
pci_dev = eth_dev->pci_dev;
|
||||||
|
|
||||||
hw->device_id = pci_dev->id.device_id;
|
hw->device_id = pci_dev->id.device_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user