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

Message ID 9802c552ddd70f0d9b751ea567804bcaf0b7f0bd.1635430513.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v3,1/4] vfio: drop fallback Linux implementation |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Burakov, Anatoly Oct. 28, 2021, 2:15 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>
---
 lib/eal/include/rte_vfio.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

Chenbo Xia Nov. 5, 2021, 2:57 a.m. UTC | #1
> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Anatoly Burakov
> Sent: Thursday, October 28, 2021 10:15 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [dpdk-stable] [PATCH v3 3/4] vfio: fix documentation to match
> intended behavior
> 
> 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.
> 

Fix tag?

With above fixed:

Acked-by: Chenbo Xia <chenbo.xia@intel.com>

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

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.