[dpdk-stable] patch 'bus/vdev: fix error log on secondary device scan' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Tue Nov 20 20:11:55 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/23/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From dd10e7513a547b11f2ac8b84a87ce3e5e9aaa913 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Mon, 3 Sep 2018 16:49:29 +0800
Subject: [PATCH] bus/vdev: fix error log on secondary device scan

[ upstream commit 23f1c424599008a990bfcdf283a0c935bf5b3cdf ]

When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
the device is already be inserted. This happens when we have multiple
secondary processes which cause multiple broadcasts from primary during
bus->scan. So we don't need to log any error for -EEXIST.

Bugzilla ID: 84
Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")

Reported-by: Gage Eads <gage.eads at intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Gage Eads <gage.eads at intel.com>
---
 drivers/bus/vdev/vdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 6139dd551..69dee89a8 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -347,4 +347,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
 	const char *devname;
 	int num;
+	int ret;
 
 	strlcpy(mp_resp.name, VDEV_MP_KEY, sizeof(mp_resp.name));
@@ -381,5 +382,8 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
 	case VDEV_SCAN_ONE:
 		VDEV_LOG(INFO, "receive vdev, %s", in->name);
-		if (insert_vdev(in->name, NULL, NULL) < 0)
+		ret = insert_vdev(in->name, NULL, NULL);
+		if (ret == -EEXIST)
+			VDEV_LOG(DEBUG, "device already exist, %s", in->name);
+		else if (ret < 0)
 			VDEV_LOG(ERR, "failed to add vdev, %s", in->name);
 		break;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-20 17:53:07.596477640 +0000
+++ 0005-bus-vdev-fix-error-log-on-secondary-device-scan.patch	2018-11-20 17:53:07.000000000 +0000
@@ -1,8 +1,10 @@
-From 23f1c424599008a990bfcdf283a0c935bf5b3cdf Mon Sep 17 00:00:00 2001
+From dd10e7513a547b11f2ac8b84a87ce3e5e9aaa913 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang at intel.com>
 Date: Mon, 3 Sep 2018 16:49:29 +0800
 Subject: [PATCH] bus/vdev: fix error log on secondary device scan
 
+[ upstream commit 23f1c424599008a990bfcdf283a0c935bf5b3cdf ]
+
 When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
 the device is already be inserted. This happens when we have multiple
 secondary processes which cause multiple broadcasts from primary during
@@ -10,7 +12,6 @@
 
 Bugzilla ID: 84
 Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
-Cc: stable at dpdk.org
 
 Reported-by: Gage Eads <gage.eads at intel.com>
 Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>


More information about the stable mailing list