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 B1A5D5323 for ; Tue, 20 Nov 2018 20:14:27 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D04AC0524E1; Tue, 20 Nov 2018 19:14:27 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id AEADC600C3; Tue, 20 Nov 2018 19:14:25 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: Gage Eads , dpdk stable Date: Tue, 20 Nov 2018 19:11:55 +0000 Message-Id: <20181120191252.30277-5-ktraynor@redhat.com> In-Reply-To: <20181120191252.30277-1-ktraynor@redhat.com> References: <20181120191252.30277-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 20 Nov 2018 19:14:27 +0000 (UTC) Subject: [dpdk-stable] patch 'bus/vdev: fix error log on secondary device 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: Tue, 20 Nov 2018 19:14:28 -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/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 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 Signed-off-by: Qi Zhang Acked-by: Gage Eads --- 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 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@dpdk.org Reported-by: Gage Eads Signed-off-by: Qi Zhang