[dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Fri Nov 23 11:26:08 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/29/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 7f84852308212054338fab88279a74ddae837c68 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Thu, 25 Oct 2018 11:30:36 +0800
Subject: [PATCH] bus/vdev: fix devargs after multi-process bus scan

[ upstream commit f5b2eff0847d49a66301f0046502c6232cd5da3f ]

It's not necessary to insert device argment to devargs_list
during bus scan, but this happens when we try to attach a
device on secondary process. The patch fix the issue.

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

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/bus/vdev/vdev.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 2566d6c0d..daba77da7 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -203,5 +203,7 @@ alloc_devargs(const char *name, const char *args)
 
 static int
-insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
+insert_vdev(const char *name, const char *args,
+		struct rte_vdev_device **p_dev,
+		bool init)
 {
 	struct rte_vdev_device *dev;
@@ -232,5 +234,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
 
 	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	rte_devargs_insert(devargs);
+	if (init)
+		rte_devargs_insert(devargs);
 
 	if (p_dev)
@@ -253,5 +256,5 @@ rte_vdev_init(const char *name, const char *args)
 
 	rte_spinlock_recursive_lock(&vdev_device_list_lock);
-	ret = insert_vdev(name, args, &dev);
+	ret = insert_vdev(name, args, &dev, true);
 	if (ret == 0) {
 		ret = vdev_probe_all_drivers(dev);
@@ -382,5 +385,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
 	case VDEV_SCAN_ONE:
 		VDEV_LOG(INFO, "receive vdev, %s", in->name);
-		ret = insert_vdev(in->name, NULL, NULL);
+		ret = insert_vdev(in->name, NULL, NULL, false);
 		if (ret == -EEXIST)
 			VDEV_LOG(DEBUG, "device already exist, %s", in->name);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.357665601 +0000
+++ 0004-bus-vdev-fix-devargs-after-multi-process-bus-scan.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From f5b2eff0847d49a66301f0046502c6232cd5da3f Mon Sep 17 00:00:00 2001
+From 7f84852308212054338fab88279a74ddae837c68 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang at intel.com>
 Date: Thu, 25 Oct 2018 11:30:36 +0800
 Subject: [PATCH] bus/vdev: fix devargs after multi-process bus scan
 
+[ upstream commit f5b2eff0847d49a66301f0046502c6232cd5da3f ]
+
 It's not necessary to insert device argment to devargs_list
 during bus scan, but this happens when we try to attach a
 device on secondary process. The patch fix the issue.
 
 Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
-Cc: stable at dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 7 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
-index 685cc4e78..6952724bd 100644
+index 2566d6c0d..daba77da7 100644
 --- a/drivers/bus/vdev/vdev.c
 +++ b/drivers/bus/vdev/vdev.c
 @@ -203,5 +203,7 @@ alloc_devargs(const char *name, const char *args)
@@ -28,7 +29,7 @@
 +		bool init)
  {
  	struct rte_vdev_device *dev;
-@@ -238,5 +240,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
+@@ -232,5 +234,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
  
  	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
 -	rte_devargs_insert(devargs);
@@ -36,14 +37,14 @@
 +		rte_devargs_insert(devargs);
  
  	if (p_dev)
-@@ -258,5 +261,5 @@ rte_vdev_init(const char *name, const char *args)
+@@ -253,5 +256,5 @@ rte_vdev_init(const char *name, const char *args)
  
  	rte_spinlock_recursive_lock(&vdev_device_list_lock);
 -	ret = insert_vdev(name, args, &dev);
 +	ret = insert_vdev(name, args, &dev, true);
  	if (ret == 0) {
  		ret = vdev_probe_all_drivers(dev);
-@@ -384,5 +387,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -382,5 +385,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
  	case VDEV_SCAN_ONE:
  		VDEV_LOG(INFO, "receive vdev, %s", in->name);
 -		ret = insert_vdev(in->name, NULL, NULL);


More information about the stable mailing list