From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v1 8/8] vfio: deprecate group-based API
Date: Tue, 28 Oct 2025 16:43:21 +0000 [thread overview]
Message-ID: <b38fa7fb795eb68ace0db9b66a9b50c59db8bea8.1761669439.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1761669438.git.anatoly.burakov@intel.com>
Aside from "get group number" which is a read-only API, deprecate all VFIO
group-based API's, and steer the users towards container device assignment
model.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/include/rte_vfio.h | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h
index 735e67a54c..c57067f054 100644
--- a/lib/eal/include/rte_vfio.h
+++ b/lib/eal/include/rte_vfio.h
@@ -151,20 +151,28 @@ enum rte_vfio_mode
rte_vfio_get_mode(void);
/**
+ * @deprecated
* Check if VFIO NOIOMMU mode is enabled.
*
+ * This function is deprecated and its use is discouraged.
+ * Use `rte_vfio_get_mode()` instead to query NOIOMMU status.
+ *
* This function is only relevant on Linux in group mode.
*
* @return
* 1 if enabled.
* 0 if not enabled or not supported.
*/
-int
+int __rte_deprecated
rte_vfio_noiommu_is_enabled(void);
/**
+ * @deprecated
* Remove group fd from internal VFIO tracking.
*
+ * This function is deprecated and its use is discouraged.
+ * Use `rte_vfio_release_device()` instead, which will release the device and its resources.
+ *
* This function is only relevant on Linux in group mode.
*
* @param vfio_group_fd
@@ -179,7 +187,7 @@ rte_vfio_noiommu_is_enabled(void);
* - ENXIO - VFIO support not initialized.
* - ENOTSUP - Operation not supported.
*/
-int
+int __rte_deprecated
rte_vfio_clear_group(int vfio_group_fd);
/**
@@ -276,8 +284,12 @@ int
rte_vfio_get_container_fd(void);
/**
+ * @deprecated
* Return file descriptor for an open VFIO group.
*
+ * This function is deprecated and its use is discouraged.
+ * Use `rte_vfio_setup_device()` instead, which handles group management automatically.
+ *
* This function is only relevant on Linux in group mode.
*
* @param iommu_group_num
@@ -292,7 +304,7 @@ rte_vfio_get_container_fd(void);
* - ENXIO - VFIO support not initialized.
* - ENOTSUP - Operation not supported.
*/
-int
+int __rte_deprecated
rte_vfio_get_group_fd(int iommu_group_num);
/**
@@ -379,8 +391,12 @@ rte_vfio_container_assign_device(int vfio_container_fd,
const char *sysfs_base, const char *dev_addr);
/**
+ * @deprecated
* Bind an IOMMU group to a container.
*
+ * This function is deprecated and its use is discouraged.
+ * Use `rte_vfio_container_assign_device()` instead to assign devices to a non-default container.
+ *
* This function is only relevant on Linux in group mode.
*
* @param container_fd
@@ -399,12 +415,17 @@ rte_vfio_container_assign_device(int vfio_container_fd,
* - ENXIO - VFIO support not initialized.
* - ENOTSUP - Operation not supported.
*/
-int
+int __rte_deprecated
rte_vfio_container_group_bind(int container_fd, int iommu_group_num);
/**
+ * @deprecated
* Unbind an IOMMU group from a container.
*
+ * This function is deprecated and its use is discouraged.
+ * Use `rte_vfio_release_device()` instead to release devices, which handles group cleanup
+ * automatically.
+ *
* This function is only relevant on Linux in group mode.
*
* @param container_fd
@@ -423,7 +444,7 @@ rte_vfio_container_group_bind(int container_fd, int iommu_group_num);
* - ENXIO - VFIO support not initialized.
* - ENOTSUP - Operation not supported.
*/
-int
+int __rte_deprecated
rte_vfio_container_group_unbind(int container_fd, int iommu_group_num);
/**
--
2.47.3
next prev parent reply other threads:[~2025-10-28 16:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 16:43 [PATCH v1 0/8] Support VFIO cdev API in DPDK Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 1/8] uapi: update to v6.17 and add iommufd.h Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 2/8] vfio: add container device assignment API Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 3/8] vhost: remove group-related API from drivers Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 4/8] vfio: do not setup the device on get device info Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 5/8] vfio: cleanup and refactor Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 6/8] vfio: introduce cdev mode Anatoly Burakov
2025-10-28 16:43 ` [PATCH v1 7/8] doc: deprecate VFIO group-based APIs Anatoly Burakov
2025-10-28 16:43 ` Anatoly Burakov [this message]
2025-10-29 9:50 ` 回复:[PATCH v1 0/8] Support VFIO cdev API in DPDK Dimon
2025-10-29 12:03 ` Burakov, Anatoly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b38fa7fb795eb68ace0db9b66a9b50c59db8bea8.1761669439.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).