[dpdk-stable] patch 'bus/vdev: fix hotplug twice' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed Apr 10 18:43:55 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Kevin Traynor

---
>From b7990ead49884629573a644041748d4b455b873b Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at mellanox.com>
Date: Thu, 21 Feb 2019 20:01:25 +0100
Subject: [PATCH] bus/vdev: fix hotplug twice

[ upstream commit e892fa595e19b5cce315045444b3b7e31130ef19 ]

In case vdev was already probed, it shouldn't be probed again,
and it should return -EEXIST as error.
There are some checks in vdev_probe() and insert_vdev(),
but a check was missing in vdev_plug().
The check is moved in vdev_probe_all_drivers() which is called
in all code paths.

Fixes: e9d159c3d534 ("eal: allow probing a device again")

Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/bus/vdev/vdev.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 722541179..87f0e2b6b 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -144,4 +144,7 @@ vdev_probe_all_drivers(struct rte_vdev_device *dev)
 	int ret;
 
+	if (rte_dev_is_probed(&dev->device))
+		return -EEXIST;
+
 	name = rte_vdev_device_name(dev);
 	VDEV_LOG(DEBUG, "Search driver to probe device %s", name);
@@ -481,5 +484,5 @@ vdev_probe(void)
 {
 	struct rte_vdev_device *dev;
-	int ret = 0;
+	int r, ret = 0;
 
 	/* call the init function for each virtual device */
@@ -490,8 +493,8 @@ vdev_probe(void)
 		 */
 
-		if (rte_dev_is_probed(&dev->device))
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
+		r = vdev_probe_all_drivers(dev);
+		if (r != 0) {
+			if (r == -EEXIST)
+				continue;
 			VDEV_LOG(ERR, "failed to initialize %s device",
 				rte_vdev_device_name(dev));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-10 14:06:11.488146624 +0100
+++ 0047-bus-vdev-fix-hotplug-twice.patch	2019-04-10 14:06:07.986291450 +0100
@@ -1,8 +1,10 @@
-From e892fa595e19b5cce315045444b3b7e31130ef19 Mon Sep 17 00:00:00 2001
+From b7990ead49884629573a644041748d4b455b873b Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland at mellanox.com>
 Date: Thu, 21 Feb 2019 20:01:25 +0100
 Subject: [PATCH] bus/vdev: fix hotplug twice
 
+[ upstream commit e892fa595e19b5cce315045444b3b7e31130ef19 ]
+
 In case vdev was already probed, it shouldn't be probed again,
 and it should return -EEXIST as error.
 There are some checks in vdev_probe() and insert_vdev(),
@@ -11,7 +13,6 @@
 in all code paths.
 
 Fixes: e9d159c3d534 ("eal: allow probing a device again")
-Cc: stable at dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
 Signed-off-by: Thomas Monjalon <thomas at monjalon.net>


More information about the stable mailing list