[dpdk-dev] [PATCH v2 17/19] vhost-user: iommu: postpone device creation until ring are mapped
Yuanhan Liu
yliu at fridaylinux.org
Fri Sep 29 14:34:32 CEST 2017
On Sun, Sep 24, 2017 at 06:19:19PM +0200, Maxime Coquelin wrote:
> static int
> -vhost_user_iotlb_msg(struct virtio_net *dev, struct VhostUserMsg *msg)
> +is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
> {
> + struct vhost_vring_addr *ra;
> + uint64_t start, end;
> +
> + start = imsg->iova;
> + end = start + imsg->size;
> +
> + ra = &vq->ring_addrs;
> + if (ra->desc_user_addr >= start && ra->desc_user_addr < end)
> + return 1;
> + if (ra->avail_user_addr >= start && ra->avail_user_addr < end)
> + return 1;
> + if (ra->used_user_addr >= start && ra->used_user_addr < end)
> + return 1;
> +
> + return -1;
It should be "return 0" here.
--yliu
> +}
More information about the dev
mailing list