net/ice: cleanup RSS/FDIR profile on device init
[dpdk.git] / drivers / net / virtio / virtio_pci.c
index c8883c3..4468e89 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 !=