]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vhost: don't send RESET_OWNER at stop
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 13 Nov 2015 07:24:10 +0000 (15:24 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 16 Nov 2015 10:02:54 +0000 (12:02 +0200)
First of all, RESET_OWNER message is sent incorrectly, as it's sent
before GET_VRING_BASE. And the reset message would let the later call
get nothing correct.

And, sending SET_VRING_ENABLE at stop, which has already been done,
makes more sense than RESET_OWNER.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/vhost_net.c

index d91b7b155ea7a8cfc7d777704d9c6842edc60256..14337a486c415369da6a0f8e539441ae1d1d2889 100644 (file)
@@ -292,12 +292,6 @@ static void vhost_net_stop_one(struct vhost_net *net,
             int r = vhost_ops->vhost_net_set_backend(&net->dev, &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_reset_device(&net->dev);
-            assert(r >= 0);
-        }
     }
     if (net->nc->info->poll) {
         net->nc->info->poll(net->nc, true);