[dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev

Flavio Leitner fbl at sysclose.org
Fri Aug 14 14:16:17 CEST 2015


On Fri, Aug 14, 2015 at 02:29:51AM +0000, Ouyang, Changchun wrote:
> > -----Original Message-----
> > From: Flavio Leitner [mailto:fbl at sysclose.org]
> > Sent: Thursday, August 13, 2015 8:52 PM
> > To: Ouyang, Changchun
> > Cc: dev at 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

 



More information about the dev mailing list