DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes
@ 2017-10-09 12:07 Maxime Coquelin
  2017-10-09 12:07 ` [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped Maxime Coquelin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maxime Coquelin @ 2017-10-09 12:07 UTC (permalink / raw)
  To: yliu, dev; +Cc: thomas, Maxime Coquelin

Hi Yuanhan,

As discussed, please find the 32bits compilation fixes.

Regards,
Maxime

Maxime Coquelin (2):
  fixup! vhost-user: iommu: postpone device creation until ring are
    mapped
  fixup! vhost: iommu: Invalidate vring in case of matching IOTLB
    invalidate

 lib/librte_vhost/vhost.c      | 6 +++---
 lib/librte_vhost/vhost_user.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped
  2017-10-09 12:07 [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Maxime Coquelin
@ 2017-10-09 12:07 ` Maxime Coquelin
  2017-10-09 12:07 ` [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate Maxime Coquelin
  2017-10-10  2:31 ` [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Yuanhan Liu
  2 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2017-10-09 12:07 UTC (permalink / raw)
  To: yliu, dev; +Cc: thomas, Maxime Coquelin

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index e1f75feca..cbccf2390 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -144,7 +144,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 		goto out;
 
 	size = sizeof(struct vring_desc) * vq->size;
-	vq->desc = (struct vring_desc *)vhost_iova_to_vva(dev, vq,
+	vq->desc = (struct vring_desc *)(uintptr_t)vhost_iova_to_vva(dev, vq,
 						vq->ring_addrs.desc_user_addr,
 						size, VHOST_ACCESS_RW);
 	if (!vq->desc)
@@ -152,7 +152,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 
 	size = sizeof(struct vring_avail);
 	size += sizeof(uint16_t) * vq->size;
-	vq->avail = (struct vring_avail *)vhost_iova_to_vva(dev, vq,
+	vq->avail = (struct vring_avail *)(uintptr_t)vhost_iova_to_vva(dev, vq,
 						vq->ring_addrs.avail_user_addr,
 						size, VHOST_ACCESS_RW);
 	if (!vq->avail)
@@ -160,7 +160,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 
 	size = sizeof(struct vring_used);
 	size += sizeof(struct vring_used_elem) * vq->size;
-	vq->used = (struct vring_used *)vhost_iova_to_vva(dev, vq,
+	vq->used = (struct vring_used *)(uintptr_t)vhost_iova_to_vva(dev, vq,
 						vq->ring_addrs.used_user_addr,
 						size, VHOST_ACCESS_RW);
 	if (!vq->used)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate
  2017-10-09 12:07 [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Maxime Coquelin
  2017-10-09 12:07 ` [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped Maxime Coquelin
@ 2017-10-09 12:07 ` Maxime Coquelin
  2017-10-10  2:31 ` [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Yuanhan Liu
  2 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2017-10-09 12:07 UTC (permalink / raw)
  To: yliu, dev; +Cc: thomas, Maxime Coquelin

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 363e20245..a37e99d8f 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1017,18 +1017,18 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,
 	istart = imsg->iova;
 	iend = istart + imsg->size - 1;
 
-	vstart = (uint64_t)vq->desc;
+	vstart = (uintptr_t)vq->desc;
 	vend = vstart + sizeof(struct vring_desc) * vq->size - 1;
 	if (vstart <= iend && istart <= vend)
 		return 1;
 
-	vstart = (uint64_t)vq->avail;
+	vstart = (uintptr_t)vq->avail;
 	vend = vstart + sizeof(struct vring_avail);
 	vend += sizeof(uint16_t) * vq->size - 1;
 	if (vstart <= iend && istart <= vend)
 		return 1;
 
-	vstart = (uint64_t)vq->used;
+	vstart = (uintptr_t)vq->used;
 	vend = vstart + sizeof(struct vring_used);
 	vend += sizeof(struct vring_used_elem) * vq->size - 1;
 	if (vstart <= iend && istart <= vend)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes
  2017-10-09 12:07 [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Maxime Coquelin
  2017-10-09 12:07 ` [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped Maxime Coquelin
  2017-10-09 12:07 ` [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate Maxime Coquelin
@ 2017-10-10  2:31 ` Yuanhan Liu
  2 siblings, 0 replies; 4+ messages in thread
From: Yuanhan Liu @ 2017-10-10  2:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, thomas

On Mon, Oct 09, 2017 at 02:07:32PM +0200, Maxime Coquelin wrote:
> Hi Yuanhan,
> 
> As discussed, please find the 32bits compilation fixes.

That's handy. Applied.

Thanks.

	--yliu
> 
> Regards,
> Maxime
> 
> Maxime Coquelin (2):
>   fixup! vhost-user: iommu: postpone device creation until ring are
>     mapped
>   fixup! vhost: iommu: Invalidate vring in case of matching IOTLB
>     invalidate
> 
>  lib/librte_vhost/vhost.c      | 6 +++---
>  lib/librte_vhost/vhost_user.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> -- 
> 2.13.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-10  2:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 12:07 [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Maxime Coquelin
2017-10-09 12:07 ` [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped Maxime Coquelin
2017-10-09 12:07 ` [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate Maxime Coquelin
2017-10-10  2:31 ` [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).