pci: use new address comparison function
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_pci.c
index b4dbf95..3a853a6 100644 (file)
 #include <rte_malloc.h>
 #include <rte_devargs.h>
 #include <rte_memcpy.h>
+#include <rte_vfio.h>
 
 #include "eal_filesystem.h"
 #include "eal_private.h"
 #include "eal_pci_init.h"
-#include "eal_vfio.h"
 
 /**
  * @file
@@ -363,7 +363,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
                int ret;
 
                TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
-                       ret = rte_eal_compare_pci_addr(&dev->addr, &dev2->addr);
+                       ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr);
                        if (ret > 0)
                                continue;
 
@@ -460,6 +460,11 @@ rte_pci_scan(void)
        if (internal_config.no_pci)
                return 0;
 
+#ifdef VFIO_PRESENT
+       if (!pci_vfio_is_enabled())
+               RTE_LOG(DEBUG, EAL, "VFIO PCI modules not loaded\n");
+#endif
+
        dir = opendir(pci_get_sysfs_path());
        if (dir == NULL) {
                RTE_LOG(ERR, EAL, "%s(): opendir failed: %s\n",