From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6069B1B519 for ; Fri, 23 Nov 2018 11:28:41 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C6DE030C810B; Fri, 23 Nov 2018 10:28:40 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8270E413C; Fri, 23 Nov 2018 10:28:39 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: dpdk stable Date: Fri, 23 Nov 2018 10:26:08 +0000 Message-Id: <20181123102713.17309-4-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 10:28:40 +0000 (UTC) Subject: [dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 10:28:41 -0000 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 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 --- 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 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@dpdk.org Signed-off-by: Qi Zhang --- @@ -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);