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 621481B4FA for ; Fri, 23 Nov 2018 11:29: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 C6F21C05000C; Fri, 23 Nov 2018 10:29:40 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 062CF6128A; Fri, 23 Nov 2018 10:29:38 +0000 (UTC) From: Kevin Traynor To: Tiwei Bie Cc: Stephen Hemminger , Maxime Coquelin , dpdk stable Date: Fri, 23 Nov 2018 10:26:35 +0000 Message-Id: <20181123102713.17309-31-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.31]); Fri, 23 Nov 2018 10:29:40 +0000 (UTC) Subject: [dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' 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:29: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 9129ff86041f8751d6b0903a5a622770010fc5fd Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Mon, 29 Oct 2018 13:28:03 +0800 Subject: [PATCH] net/virtio-user: do not stop stopped device again [ upstream commit f457e9007a117a2ca8fd00ed9ee29e734d04752d ] Without this change, virtio-user still works, but it will show annoying error messages like this on shutdown: vhost_kernel_set_backend(): VHOST_NET_SET_BACKEND fails, Operation not permitted vhost_kernel_ioctl(): VHOST_RESET_OWNER failed: Operation not permitted Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug") Reported-by: Stephen Hemminger Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 55a82e4b0..bef253488 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -185,4 +185,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev) pthread_mutex_lock(&dev->mutex); + if (!dev->started) + goto out; + for (i = 0; i < dev->max_queue_pairs; ++i) dev->ops->enable_qp(dev, i, 0); @@ -194,4 +197,5 @@ int virtio_user_stop_device(struct virtio_user_dev *dev) } dev->started = false; +out: pthread_mutex_unlock(&dev->mutex); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:55.062310127 +0000 +++ 0031-net-virtio-user-do-not-stop-stopped-device-again.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From f457e9007a117a2ca8fd00ed9ee29e734d04752d Mon Sep 17 00:00:00 2001 +From 9129ff86041f8751d6b0903a5a622770010fc5fd Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Mon, 29 Oct 2018 13:28:03 +0800 Subject: [PATCH] net/virtio-user: do not stop stopped device again +[ upstream commit f457e9007a117a2ca8fd00ed9ee29e734d04752d ] + Without this change, virtio-user still works, but it will show annoying error messages like this on shutdown: @@ -11,7 +13,6 @@ Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug") -Cc: stable@dpdk.org Reported-by: Stephen Hemminger Signed-off-by: Tiwei Bie @@ -21,7 +22,7 @@ 1 file changed, 4 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c -index b4997ee3f..0e3563051 100644 +index 55a82e4b0..bef253488 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -185,4 +185,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)