[dpdk-dev] [PATCH v6 6/7] virtio-user: add new virtual pci driver for virtio

Yuanhan Liu yuanhan.liu at linux.intel.com
Mon Jun 6 10:01:02 CEST 2016


On Thu, Jun 02, 2016 at 09:54:36AM +0000, Jianfeng Tan wrote:
> +
> +	desc_addr = (uint64_t)vq->mz->addr;
> +	avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);
> +	used_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,
> +							 ring[vq->vq_nentries]),
> +				   VIRTIO_PCI_VRING_ALIGN);
> +
> +	dev->vrings[queue_idx].num = vq->vq_nentries;
> +	dev->vrings[queue_idx].desc = (void *)desc_addr;
> +	dev->vrings[queue_idx].avail = (void *)avail_addr;
> +	dev->vrings[queue_idx].used = (void *)used_addr;

That would break 32 bit build. please also do more build and function
test, with and without CONFIG_RTE_VIRTIO_VDEV enabled, to make sure
we will not break anything. I'm sure you will meet build error without
that option enabled.

BTW, let's be consistent with using VIRTIO_USER_DEV instead of VDEV
or VIRTIO_VDEV?

Another thing that might be a bit late to ask is that how about
removing the vhost-net support? I mean, it's DPDK; if user stick
to using DPDK virtio-user, he will stick to using DPDK vhost-user
as well, but not the vhost-net. So, let's keep it being simple
first. And if there is really a need for vhost-net, we can add it
back later, easily. Makes sense?

I also would suggest you do a rebase based on my latest tree.

	--yliu


More information about the dev mailing list