From patchwork Wed Dec 2 13:54:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 551379 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B664514030F for ; Thu, 3 Dec 2015 00:55:13 +1100 (AEDT) Received: from localhost ([::1]:58201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a47sF-0005AF-Do for incoming@patchwork.ozlabs.org; Wed, 02 Dec 2015 08:55:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a47ry-0004lY-Ac for qemu-devel@nongnu.org; Wed, 02 Dec 2015 08:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a47ru-0005wd-6x for qemu-devel@nongnu.org; Wed, 02 Dec 2015 08:54:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a47ru-0005wY-1K; Wed, 02 Dec 2015 08:54:50 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 6FD481B402D; Wed, 2 Dec 2015 13:54:49 +0000 (UTC) Received: from redhat.com (vpn1-4-19.ams2.redhat.com [10.36.4.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id tB2Dsldf019121; Wed, 2 Dec 2015 08:54:48 -0500 Date: Wed, 2 Dec 2015 15:54:47 +0200 From: "Michael S. Tsirkin" To: qemu-stable@nongnu.org Message-ID: <20151202155426-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [yuanhan.liu@linux.intel.com: [PATCH 2/2] vhost: don't send RESET_OWNER at stop] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Cc qemu-stable@nongnu.org as this fixes some clients. ----- Forwarded message from Yuanhan Liu ----- Date: Fri, 13 Nov 2015 15:24:10 +0800 From: Yuanhan Liu To: qemu-devel@nongnu.org Cc: mst@redhat.com, Yuanhan Liu 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 --- 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);