From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel_co_jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=+/PK1cJIVQrkq+Rd3MZxd/OxjxH8nrtsHfCcqOrNYEc=; b=k1jt2oIrzAIr/xgHFVLM24f3et8CkZ1DBRL7hkHTD7AxoWNPnNMNtfW2Gs41Nocwzz I3FoPVkacLQQbePD9a3vMac3Qw52Ye4wrVrP6lduD/R2Vo43737NmUkPRVC/8sCLKpZZ ivy+cBghOGKk0tUbCGybcAPkd2Txvf9DX4C7w3AiGVeIWjEzbGp7t78hSCV5hAYH49yi VbCup5z8/03tLUzmEuDPOhjP3IjpcUjbpOpxFUG9iliqKZ5KYM52DHQM+Fhf+cl2g45M YnW83nWWhmEugYh2Nmukt66dBYVBp+OEf5yXIfNexii3wIJd0Z46iRTDmNAhh+vKLNzp nkCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=+/PK1cJIVQrkq+Rd3MZxd/OxjxH8nrtsHfCcqOrNYEc=; b=fPNG48EI450IqoBMW+/sQI7UYyZzXkCkmmH0Ib8TwfwgLZDL6UE3qKE8fpALGLevEu uHaJQOJBlteqeUIyNvMcg4cGdpy2m/l8CMufQTPh+97KHsQUAgjlqRAKY1IgX4VbF+2W vADX63EVU+q6Es7fNECmUarlZzzTlRGKSr0rvr0YYxJshtQKCWOn0K5uBBaTmzI/cBhR KAsrw7sH3s97UDdcs4GnpZZwMXiPEyc6sof/lxkc5sKjsknamovPfc1J8TZm1ZSFk636 ShujegTdNXq6j20wsToq6JJMPHR0AJ2f6DbbK8HyCCeFpl8nBBsF7z0Gy5F897A2tk+K I4Ew== X-Gm-Message-State: ALoCoQnHRSThOYWLZteUCzhl3nr4xCVjfW18dU4ohJyt6IJJHYD9vQITaDPWDT4rT4Lq9XKpQXT8 X-Received: by 10.68.137.161 with SMTP id qj1mr26728962pbb.154.1445926842895; Mon, 26 Oct 2015 23:20:42 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id xm4sm37516754pab.27.2015.10.26.23.20.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2015 23:20:42 -0700 (PDT) To: Yuanhan Liu 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> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <562F17B8.5020107@igel.co.jp> Date: Tue, 27 Oct 2015 15:20:40 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151026054215.GY3115@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, marcel@redhat.com, "Michael S. Tsirkin" 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 06:20:44 -0000 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