]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/virtio/virtio_pci.c
net/ice: cleanup RSS/FDIR profile on device init
[dpdk.git] / drivers / net / virtio / virtio_pci.c
index c8883c32e96c806524b8f3b5e0b61d418fb3382c..4468e89cbaf4c678aed1cebccc7a3e63c34d1079 100644 (file)
@@ -3,7 +3,7 @@
  */
 #include <stdint.h>
 
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
  #include <dirent.h>
  #include <fcntl.h>
 #endif
@@ -678,6 +678,7 @@ vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw)
 
        PMD_INIT_LOG(INFO, "trying with legacy virtio pci.");
        if (rte_pci_ioport_map(dev, 0, VTPCI_IO(hw)) < 0) {
+               rte_pci_unmap_device(dev);
                if (dev->kdrv == RTE_KDRV_UNKNOWN &&
                    (!dev->device.devargs ||
                     dev->device.devargs->bus !=