Re: [PATCH v4 02/12] vhost: support multiple queues in virtio dev
From: Flavio Leitner <hidden>
Date: 2015-08-14 12:16:23
On Fri, Aug 14, 2015 at 02:29:51AM +0000, Ouyang, Changchun wrote:
quoted
-----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:quoted
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