[PATCH 03/13] bus/vdev: remove driver setting in probe
David Marchand
david.marchand at redhat.com
Thu Jun 11 11:45:40 CEST 2026
Setting the device driver field is now the responsibility of EAL
(see local_dev_probe).
Yet, because of the VDEV API, rte_vdev_init() must be updated to mark
the device as probed.
Fixes: f282771a04ef ("bus: factorize driver reference")
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
drivers/bus/vdev/vdev.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 3bddf8938c..673e8a73b2 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -188,7 +188,6 @@ vdev_probe_device(struct rte_driver *drv, struct rte_device *dev)
struct rte_vdev_driver *vdev_drv = RTE_BUS_DRIVER(drv, *vdev_drv);
const char *name;
enum rte_iova_mode iova_mode;
- int ret;
name = rte_vdev_device_name(vdev_dev);
VDEV_LOG(DEBUG, "Search driver to probe device %s", name);
@@ -200,10 +199,7 @@ vdev_probe_device(struct rte_driver *drv, struct rte_device *dev)
return -1;
}
- ret = vdev_drv->probe(vdev_dev);
- if (ret == 0)
- vdev_dev->device.driver = &vdev_drv->driver;
- return ret;
+ return vdev_drv->probe(vdev_dev);
}
/* The caller shall be responsible for thread-safe */
@@ -337,6 +333,8 @@ rte_vdev_init(const char *name, const char *args)
free(dev);
} else if (ret > 0) {
goto next_driver;
+ } else {
+ dev->device.driver = drv;
}
}
rte_spinlock_recursive_unlock(&vdev_device_list_lock);
--
2.53.0
More information about the dev
mailing list