[dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent
Anatoly Burakov
anatoly.burakov at intel.com
Thu Sep 16 12:36:37 CEST 2021
Currently, when VFIO support is not compiled, FreeBSD and Linux have
different return values. Fix Linux implementation to follow FreeBSD one.
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
Notes:
Current minimum support Linux kernel is 4.4, and Meson build file sets the
RTE_EAL_VFIO config option to `true` simply because we are compiling for Linux.
So, it looks like VFIO support is pretty much assumed on Linux, so i think we
can safely drop the fallback dummy implementation from Linux altogether?
lib/eal/linux/eal_vfio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c
index 25add2fa5d..b9e4d3ad3c 100644
--- a/lib/eal/linux/eal_vfio.c
+++ b/lib/eal/linux/eal_vfio.c
@@ -2111,19 +2111,19 @@ rte_vfio_enable(__rte_unused const char *modname)
int
rte_vfio_is_enabled(__rte_unused const char *modname)
{
- return -1;
+ return 0;
}
int
rte_vfio_noiommu_is_enabled(void)
{
- return -1;
+ return 0;
}
int
rte_vfio_clear_group(__rte_unused int vfio_group_fd)
{
- return -1;
+ return 0;
}
int
--
2.25.1
More information about the dev
mailing list