From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbox@nvidia.com>, Matan Azrad <matan@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH v2 12/19] vhost: remove group-related API from drivers
Date: Fri, 14 Nov 2025 17:40:22 +0000 [thread overview]
Message-ID: <2997293f976bbaf0ab370331a5739baf7571ba40.1763142008.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1763142007.git.anatoly.burakov@intel.com> <cover.1763142007.git.anatoly.burakov@intel.com>
Some vDPA drivers have "get_vfio_group_fd" call in their internal driver
API structure, but it is not used for anything beyond device assignment
to containers which can now be achieved via other means, so remove this
API and all its usages.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
doc/guides/prog_guide/vhost_lib.rst | 4 ----
drivers/vdpa/ifc/ifcvf_vdpa.c | 19 -------------------
drivers/vdpa/mlx5/mlx5_vdpa.c | 1 -
drivers/vdpa/nfp/nfp_vdpa.c | 20 --------------------
lib/vhost/vdpa_driver.h | 3 ---
5 files changed, 47 deletions(-)
diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 0c2b4d020a..2f80cf4072 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -471,10 +471,6 @@ Finally, a set of device ops is defined for device specific operations:
Called to allow the device to response to RARP sending.
-* ``get_vfio_group_fd``
-
- Called to get the VFIO group fd of the device.
-
* ``get_vfio_device_fd``
Called to get the VFIO device fd of the device.
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 6f1c050787..63f4172da5 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -58,7 +58,6 @@ struct ifcvf_internal {
struct ifcvf_hw hw;
int configured;
int vfio_container_fd;
- int vfio_group_fd;
int vfio_dev_fd;
rte_thread_t tid; /* thread for notify relay */
rte_thread_t intr_tid; /* thread for config space change interrupt relay */
@@ -1204,22 +1203,6 @@ ifcvf_set_features(int vid)
return 0;
}
-static int
-ifcvf_get_vfio_group_fd(int vid)
-{
- struct rte_vdpa_device *vdev;
- struct internal_list *list;
-
- vdev = rte_vhost_get_vdpa_device(vid);
- list = find_internal_resource_by_vdev(vdev);
- if (list == NULL) {
- DRV_LOG(ERR, "Invalid vDPA device: %p", vdev);
- return -1;
- }
-
- return list->internal->vfio_group_fd;
-}
-
static int
ifcvf_get_vfio_device_fd(int vid)
{
@@ -1465,7 +1448,6 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
.set_vring_state = ifcvf_set_vring_state,
.set_features = ifcvf_set_features,
.migration_done = NULL,
- .get_vfio_group_fd = ifcvf_get_vfio_group_fd,
.get_vfio_device_fd = ifcvf_get_vfio_device_fd,
.get_notify_area = ifcvf_get_notify_area,
.get_dev_type = ifcvf_get_device_type,
@@ -1596,7 +1578,6 @@ static struct rte_vdpa_dev_ops ifcvf_blk_ops = {
.dev_close = ifcvf_dev_close,
.set_vring_state = ifcvf_set_vring_state,
.migration_done = NULL,
- .get_vfio_group_fd = ifcvf_get_vfio_group_fd,
.get_vfio_device_fd = ifcvf_get_vfio_device_fd,
.get_notify_area = ifcvf_get_notify_area,
.get_config = ifcvf_blk_get_config,
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 11708e2005..1bb5de51b6 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -523,7 +523,6 @@ static struct rte_vdpa_dev_ops mlx5_vdpa_ops = {
.set_vring_state = mlx5_vdpa_set_vring_state,
.set_features = mlx5_vdpa_features_set,
.migration_done = NULL,
- .get_vfio_group_fd = NULL,
.get_vfio_device_fd = mlx5_vdpa_get_device_fd,
.get_notify_area = mlx5_vdpa_get_notify_area,
.get_stats_names = mlx5_vdpa_get_stats_names,
diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c
index 4885fa5cbc..efd7ee7d95 100644
--- a/drivers/vdpa/nfp/nfp_vdpa.c
+++ b/drivers/vdpa/nfp/nfp_vdpa.c
@@ -36,9 +36,7 @@ struct nfp_vdpa_dev {
struct nfp_vdpa_hw hw;
int vfio_container_fd;
- int vfio_group_fd;
int vfio_dev_fd;
- int iommu_group;
rte_thread_t tid; /**< Thread for notify relay */
int epoll_fd;
@@ -152,7 +150,6 @@ static void
nfp_vdpa_vfio_teardown(struct nfp_vdpa_dev *device)
{
rte_pci_unmap_device(device->pci_dev);
- rte_vfio_container_group_unbind(device->vfio_container_fd, device->iommu_group);
rte_vfio_container_destroy(device->vfio_container_fd);
}
@@ -1018,22 +1015,6 @@ nfp_vdpa_dev_close(int vid)
return 0;
}
-static int
-nfp_vdpa_get_vfio_group_fd(int vid)
-{
- struct rte_vdpa_device *vdev;
- struct nfp_vdpa_dev_node *node;
-
- vdev = rte_vhost_get_vdpa_device(vid);
- node = nfp_vdpa_find_node_by_vdev(vdev);
- if (node == NULL) {
- DRV_VDPA_LOG(ERR, "Invalid vDPA device: %p.", vdev);
- return -ENODEV;
- }
-
- return node->device->vfio_group_fd;
-}
-
static int
nfp_vdpa_get_vfio_device_fd(int vid)
{
@@ -1185,7 +1166,6 @@ struct rte_vdpa_dev_ops nfp_vdpa_ops = {
.dev_close = nfp_vdpa_dev_close,
.set_vring_state = nfp_vdpa_set_vring_state,
.set_features = nfp_vdpa_set_features,
- .get_vfio_group_fd = nfp_vdpa_get_vfio_group_fd,
.get_vfio_device_fd = nfp_vdpa_get_vfio_device_fd,
.get_notify_area = nfp_vdpa_get_notify_area,
};
diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h
index 42392a0d14..c7b9be09fb 100644
--- a/lib/vhost/vdpa_driver.h
+++ b/lib/vhost/vdpa_driver.h
@@ -50,9 +50,6 @@ struct rte_vdpa_dev_ops {
/** Destination operations when migration done */
int (*migration_done)(int vid);
- /** Get the vfio group fd */
- int (*get_vfio_group_fd)(int vid);
-
/** Get the vfio device fd */
int (*get_vfio_device_fd)(int vid);
--
2.47.3
next prev parent reply other threads:[~2025-11-14 17:42 UTC|newest]
Thread overview: 35+ 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 ` [PATCH v1 8/8] vfio: deprecate group-based API Anatoly Burakov
2025-10-29 9:50 ` 回复:[PATCH v1 0/8] Support VFIO cdev API in DPDK Dimon
2025-10-29 12:03 ` Burakov, Anatoly
2025-10-30 9:21 ` [PATCH " David Marchand
2025-10-30 10:11 ` Burakov, Anatoly
2025-11-14 17:40 ` [PATCH v2 00/19] " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 01/19] doc: add deprecation notice for VFIO API Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 02/19] doc: add deprecation notice for vDPA driver API Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 03/19] uapi: update to v6.17 and add iommufd.h Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 04/19] vfio: make all functions internal Anatoly Burakov
2025-11-14 18:18 ` Stephen Hemminger
2025-11-14 17:40 ` [PATCH v2 05/19] vfio: add container device assignment API Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 06/19] vfio: split get device info from setup Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 07/19] net/nbl: do not use VFIO group bind API Anatoly Burakov
2025-11-15 8:31 ` 回复:[PATCH " Dimon
2025-11-14 17:40 ` [PATCH v2 08/19] net/ntnic: use container device assignment API Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 09/19] vdpa/ifc: " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 10/19] vdpa/nfp: " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 11/19] vdpa/sfc: " Anatoly Burakov
2025-11-14 17:40 ` Anatoly Burakov [this message]
2025-11-14 17:40 ` [PATCH v2 13/19] vfio: cleanup and refactor Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 14/19] bus/pci: use the new VFIO mode API Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 15/19] bus/fslmc: " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 16/19] net/hinic3: " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 17/19] net/ntnic: " Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 18/19] vfio: remove group API functions Anatoly Burakov
2025-11-14 17:40 ` [PATCH v2 19/19] vfio: introduce cdev mode Anatoly Burakov
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=2997293f976bbaf0ab370331a5739baf7571ba40.1763142008.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=chaoyong.he@corigine.com \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=maxime.coquelin@redhat.com \
--cc=viacheslavo@nvidia.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).