qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-stable@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [yuanhan.liu@linux.intel.com: [PATCH 2/2] vhost: don't send RESET_OWNER at stop]
Date: Wed, 2 Dec 2015 15:54:47 +0200	[thread overview]
Message-ID: <20151202155426-mutt-send-email-mst@redhat.com> (raw)

Cc qemu-stable@nongnu.org as this fixes some clients.

----- Forwarded message from Yuanhan Liu <yuanhan.liu@linux.intel.com> -----

Date: Fri, 13 Nov 2015 15:24:10 +0800
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, Yuanhan Liu <yuanhan.liu@linux.intel.com>
Subject: [PATCH 2/2] vhost: don't send RESET_OWNER at stop
Message-Id: <1447399450-29489-2-git-send-email-yuanhan.liu@linux.intel.com>
In-Reply-To: <1447399450-29489-1-git-send-email-yuanhan.liu@linux.intel.com>

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>
---
 hw/net/vhost_net.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index d91b7b1..14337a4 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -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);
-- 
1.9.3

----- End forwarded message -----

                 reply	other threads:[~2015-12-02 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151202155426-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).