From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DA9C96A80 for ; Tue, 27 Oct 2015 10:17:20 +0100 (CET) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D3C9D8EA35; Tue, 27 Oct 2015 09:17:19 +0000 (UTC) Received: from redhat.com (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t9R9HHNe001290; Tue, 27 Oct 2015 05:17:18 -0400 Date: Tue, 27 Oct 2015 11:17:16 +0200 From: "Michael S. Tsirkin" To: Tetsuya Mukawa Message-ID: <20151027111444-mutt-send-email-mst@redhat.com> References: <1445399294-18826-1-git-send-email-yuanhan.liu@linux.intel.com> <1445517356-19780-1-git-send-email-yuanhan.liu@linux.intel.com> <1445517356-19780-4-git-send-email-yuanhan.liu@linux.intel.com> <562DB8F8.4050707@igel.co.jp> <20151026054215.GY3115@yliu-dev.sh.intel.com> <562F17B8.5020107@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <562F17B8.5020107@igel.co.jp> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: dev@dpdk.org, marcel@redhat.com Subject: Re: [dpdk-dev] [PATCH v8 3/8] vhost: vring queue setup for multiple queue support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 09:17:21 -0000 On Tue, Oct 27, 2015 at 03:20:40PM +0900, Tetsuya Mukawa wrote: > On 2015/10/26 14:42, Yuanhan Liu wrote: > > On Mon, Oct 26, 2015 at 02:24:08PM +0900, Tetsuya Mukawa wrote: > >> On 2015/10/22 21:35, Yuanhan Liu wrote: > > ... > >>> @@ -292,13 +300,13 @@ user_get_vring_base(struct vhost_device_ctx ctx, > >>> * sent and only sent in vhost_vring_stop. > >>> * TODO: cleanup the vring, it isn't usable since here. > >>> */ > >>> - if ((dev->virtqueue[VIRTIO_RXQ]->kickfd) >= 0) { > >>> - close(dev->virtqueue[VIRTIO_RXQ]->kickfd); > >>> - dev->virtqueue[VIRTIO_RXQ]->kickfd = -1; > >>> + if ((dev->virtqueue[state->index]->kickfd + VIRTIO_RXQ) >= 0) { > >>> + close(dev->virtqueue[state->index + VIRTIO_RXQ]->kickfd); > >>> + dev->virtqueue[state->index + VIRTIO_RXQ]->kickfd = -1; > >>> } > >> Hi Yuanhan, > >> > >> Please let me make sure whether below is correct. > >> if ((dev->virtqueue[state->index]->kickfd + VIRTIO_RXQ) >= 0) { > >> > >>> - if ((dev->virtqueue[VIRTIO_TXQ]->kickfd) >= 0) { > >>> - close(dev->virtqueue[VIRTIO_TXQ]->kickfd); > >>> - dev->virtqueue[VIRTIO_TXQ]->kickfd = -1; > >>> + if ((dev->virtqueue[state->index]->kickfd + VIRTIO_TXQ) >= 0) { > >>> + close(dev->virtqueue[state->index + VIRTIO_TXQ]->kickfd); > >>> + dev->virtqueue[state->index + VIRTIO_TXQ]->kickfd = -1; > >> Also, same question here. > > Oops, silly typos... Thanks for catching it out! > > > > Here is an update patch (Thomas, please let me know if you prefer me > > to send the whole patchset for you to apply): > > Hi Yuanhan, > > I may miss one more issue here. > Could you please see below patch I've submitted today? > (I may find a similar issue, so I've fixed it also in below patch.) > > - http://dpdk.org/dev/patchwork/patch/8038/ > > Thanks, > Tetsuya Looking at that, at least when MQ is enabled, please don't key stopping queues off GET_VRING_BASE. There are ENABLE/DISABLE messages for that. Generally guys, don't take whatever QEMU happens to do for granted! Look at the protocol spec under doc/specs directory, if you are making more assumptions you must document them! -- MST