pci: introduce library and driver
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index ad72789..017c402 100644 (file)
 #include <rte_cpuflags.h>
 #include <rte_interrupts.h>
 #include <rte_bus.h>
-#include <rte_pci.h>
 #include <rte_dev.h>
 #include <rte_devargs.h>
 #include <rte_version.h>
 #include <rte_atomic.h>
 #include <malloc_heap.h>
+#include <rte_vfio.h>
 
 #include "eal_private.h"
 #include "eal_thread.h"
@@ -710,10 +710,9 @@ static int rte_eal_vfio_setup(void)
 {
        int vfio_enabled = 0;
 
-       if (!internal_config.no_pci) {
-               pci_vfio_enable();
-               vfio_enabled |= pci_vfio_is_enabled();
-       }
+       if (vfio_enable("vfio"))
+               return -1;
+       vfio_enabled = vfio_is_enabled("vfio");
 
        if (vfio_enabled) {
 
@@ -985,6 +984,22 @@ int rte_eal_has_hugepages(void)
        return ! internal_config.no_hugetlbfs;
 }
 
+int rte_eal_has_pci(void)
+{
+       return !internal_config.no_pci;
+}
+
+int rte_eal_create_uio_dev(void)
+{
+       return internal_config.create_uio_dev;
+}
+
+enum rte_intr_mode
+rte_eal_vfio_intr_mode(void)
+{
+       return internal_config.vfio_intr_mode;
+}
+
 int
 rte_eal_check_module(const char *module_name)
 {