[dpdk-dev] [PATCH v2 17/19] vhost-user: iommu: postpone device creation until ring are mapped
Maxime Coquelin
maxime.coquelin at redhat.com
Fri Sep 29 14:51:39 CEST 2017
On 09/29/2017 02:34 PM, Yuanhan Liu wrote:
> 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.
Oops, thanks for spotting this.
Maxime
> --yliu
>> +}
More information about the dev
mailing list