summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio/virtio_ethdev.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-27 10:44:39 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-27 10:45:47 +0000
commita4f0fa29488e582ab8b5ef9db475b3d26ded690c (patch)
treede163f35a726d518a3f93ab6ee4ac25b8982635d /drivers/net/virtio/virtio_ethdev.c
parent29058550643267a554e0368806dece63b047c5cb (diff)
New upstream version 18.11upstream/18.11upstream
Change-Id: I6c63198045de1e34fda8a7b4665d89d5f4a20d20 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/virtio/virtio_ethdev.c')
-rw-r--r--drivers/net/virtio/virtio_ethdev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e1fe36a2..2ba66d29 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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);
}