From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [PATCH v8 3/8] vhost: vring queue setup for multiple queue support Date: Tue, 27 Oct 2015 15:20:40 +0900 Message-ID: <562F17B8.5020107@igel.co.jp> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, marcel@redhat.com, "Michael S. Tsirkin" To: Yuanhan Liu Return-path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id 96BA56787 for ; Tue, 27 Oct 2015 07:20:43 +0100 (CET) Received: by pasz6 with SMTP id z6so212143595pas.2 for ; Mon, 26 Oct 2015 23:20:43 -0700 (PDT) In-Reply-To: <20151026054215.GY3115@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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