New upstream version 18.11
[deb_dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index e1fe36a..2ba66d2 100644 (file)
@@ -1760,6 +1760,11 @@ exit:
 static int eth_virtio_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        struct rte_pci_device *pci_dev)
 {
+       if (rte_eal_iopl_init() != 0) {
+               PMD_INIT_LOG(ERR, "IOPL call failed - cannot use virtio PMD");
+               return 1;
+       }
+
        /* virtio pmd skips probe if device needs to work in vdpa mode */
        if (vdpa_mode_selected(pci_dev->device.devargs))
                return 1;
@@ -1785,11 +1790,7 @@ static struct rte_pci_driver rte_virtio_pmd = {
 
 RTE_INIT(rte_virtio_pmd_init)
 {
-       if (rte_eal_iopl_init() != 0) {
-               PMD_INIT_LOG(ERR, "IOPL call failed - cannot use virtio PMD");
-               return;
-       }
-
+       rte_eal_iopl_init();
        rte_pci_register(&rte_virtio_pmd);
 }