From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) by dpdk.org (Postfix) with ESMTP id 9DF5F8DA8 for ; Fri, 14 Aug 2015 14:16:23 +0200 (CEST) Received: from localhost (177.92.41.23 [177.92.41.23]) by mx.zohomail.com with SMTPS id 1439554581098288.85760292910027; Fri, 14 Aug 2015 05:16:21 -0700 (PDT) Date: Fri, 14 Aug 2015 09:16:17 -0300 From: Flavio Leitner To: "Ouyang, Changchun" Message-ID: <20150814121617.GC7791@x240.home> References: <1434355006-30583-1-git-send-email-changchun.ouyang@intel.com> <1439366567-3402-1-git-send-email-changchun.ouyang@intel.com> <1439366567-3402-3-git-send-email-changchun.ouyang@intel.com> <20150813125219.GB7791@x240.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev 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: Fri, 14 Aug 2015 12:16:24 -0000 On Fri, Aug 14, 2015 at 02:29:51AM +0000, Ouyang, Changchun wrote: > > -----Original Message----- > > From: Flavio Leitner [mailto:fbl@sysclose.org] > > Sent: Thursday, August 13, 2015 8:52 PM > > To: Ouyang, Changchun > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in > > virtio dev > > > > On Wed, Aug 12, 2015 at 04:02:37PM +0800, Ouyang Changchun wrote: > > > file.index = pmsg->payload.u64 & VHOST_USER_VRING_IDX_MASK; > > > + cur_qp_idx = file.index >> 1; > > > + > > > + if (dev->virt_qp_nb < cur_qp_idx + 1) { > > > + if (alloc_vring_queue_pair(dev, cur_qp_idx) == 0) > > > + dev->virt_qp_nb = cur_qp_idx + 1; > > > > Looks like it is missing vring initialization here. > > > > if (dev->virt_qp_nb < cur_qp_idx + 1) { > > if (alloc_vring_queue_pair(dev, cur_qp_idx) == 0) { > > dev->virt_qp_nb = cur_qp_idx + 1; > > init_vring_queue_pair(dev, cur_qp_idx); > > I have called the init_vring_queue_pair inside function alloc_vring_queue_pair, > It has same effect as your suggestion. Yup, I missed that. Thanks! fbl