[dpdk-dev] bus/vdev: fix vdev stops probing when device fails

Message ID 1517850903-44493-1-git-send-email-motih@mellanox.com
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Moti Haimovsky Feb. 5, 2018, 5:15 p.m.
This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Fixes: 810e5fa3688b ("vdev: move virtual device probing into a bus")
Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
 drivers/bus/vdev/vdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Monjalon Feb. 5, 2018, 11:27 p.m. | #1
05/02/2018 18:15, Moti Haimovsky:
> This commit modifies vdev_probe to continue probing all the devices
> regardless of device probing failures.
> 
> Fixes: 810e5fa3688b ("vdev: move virtual device probing into a bus")

It is not the origin commit.
Anyway it is not really a fix but a better behaviour.

> Cc: stable@dpdk.org

Exceptionnaly, Fixes tag is removed but Cc stable is kept.

> Signed-off-by: Moti Haimovsky <motih@mellanox.com>

Applied, thanks

Patch

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 0c8a6a8..e4bc724 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -364,6 +364,7 @@  struct vdev_custom_scan {
 vdev_probe(void)
 {
 	struct rte_vdev_device *dev;
+	int ret = 0;
 
 	/* call the init function for each virtual device */
 	TAILQ_FOREACH(dev, &vdev_device_list, next) {
@@ -374,11 +375,11 @@  struct vdev_custom_scan {
 		if (vdev_probe_all_drivers(dev)) {
 			VDEV_LOG(ERR, "failed to initialize %s device\n",
 				rte_vdev_device_name(dev));
-			return -1;
+			ret = -1;
 		}
 	}
 
-	return 0;
+	return ret;
 }
 
 static struct rte_device *