[dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Fri Nov 23 11:26:35 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 9129ff86041f8751d6b0903a5a622770010fc5fd Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie at intel.com>
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 <stephen at networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 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 <tiwei.bie at intel.com>
 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 at dpdk.org
 
 Reported-by: Stephen Hemminger <stephen at networkplumber.org>
 Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
@@ -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)


More information about the stable mailing list