[v2,3/4] vfio: fix documentation to match intended behavior

Message ID 9802c552ddd70f0d9b751ea567804bcaf0b7f0bd.1635428963.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Headers
Series [v2,1/4] vfio: drop fallback Linux implementation |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anatoly Burakov Oct. 28, 2021, 1:49 p.m. UTC
  On FreeBSD, `rte_vfio_is_enabled()` and `rte_vfio_noiommu_is_enabled()`
API calls will not return error, and will instead return 0. This is
intentional, because the caller of this API does not care whether VFIO
is supported at all, and will instead be interested in whether VFIO is
enabled or not. However, the doxygen comments for these functions state
that they will return an error on FreeBSD, which is incorrect.

Fix the doxygen comment to call out the fact that these
functions are only relevant on Linux, but remove the reference to
returning errors.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@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/include/rte_vfio.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Patch

diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h
index 2d90b36480..7bdb8932b2 100644
--- a/lib/eal/include/rte_vfio.h
+++ b/lib/eal/include/rte_vfio.h
@@ -150,8 +150,7 @@  int rte_vfio_enable(const char *modname);
 /**
  * Check whether a VFIO-related kmod is enabled.
  *
- * This function is only relevant to linux and will return
- * an error on BSD.
+ * This function is only relevant to Linux.
  *
  * @param modname
  *   kernel module name.
@@ -165,8 +164,7 @@  int rte_vfio_is_enabled(const char *modname);
 /**
  * Whether VFIO NOIOMMU mode is enabled.
  *
- * This function is only relevant to linux and will return
- * an error on BSD.
+ * This function is only relevant to Linux.
  *
  * @return
  *   1 if true.