qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.4] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"
@ 2015-07-30  8:36 Michael S. Tsirkin
  2015-08-04 19:00 ` Luke Gorrie
  0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2015-07-30  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Luke Gorrie, Marcel Apfelbaum

This reverts commit 294ce717e0f212ed0763307f3eab72b4a1bdf4d0.

vhost stop happens e.g. when guest unloads the driver,
so closing the backend connection is not the right
thing to do here.

VHOST_RESET_OWNER should happen on vhost_dev_cleanup - it's
the counterpart of VHOST_SET_OWNER.

Cc: Luke Gorrie <luke@snabb.co>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

I think we need this in 2.4 to avoid introducing regressions
in the protocol. We'll fix properly in 2.5.
Luke, can you comment please?

 hw/net/vhost_net.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index c864237..b8d88ec 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -284,13 +284,6 @@ static void vhost_net_stop_one(struct vhost_net *net,
                                           &file);
             assert(r >= 0);
         }
-    } else if (net->nc->info->type == NET_CLIENT_OPTIONS_KIND_VHOST_USER) {
-        for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
-            const VhostOps *vhost_ops = net->dev.vhost_ops;
-            int r = vhost_ops->vhost_call(&net->dev, VHOST_RESET_OWNER,
-                                          NULL);
-            assert(r >= 0);
-        }
     }
     if (net->nc->info->poll) {
         net->nc->info->poll(net->nc, true);
-- 
MST

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-10 13:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30  8:36 [Qemu-devel] [PATCH for-2.4] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop" Michael S. Tsirkin
2015-08-04 19:00 ` Luke Gorrie
2015-08-04 20:36   ` Michael S. Tsirkin
2015-08-06  9:33     ` Luke Gorrie
2016-08-02  9:42   ` Luke Gorrie
2016-08-02 17:32     ` Michael S. Tsirkin
2016-08-10 13:50       ` Luke Gorrie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).