DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: yliu@fridaylinux.org, dev@dpdk.org
Cc: thomas@monjalon.net, Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate
Date: Mon,  9 Oct 2017 14:07:34 +0200	[thread overview]
Message-ID: <20171009120734.21611-3-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20171009120734.21611-1-maxime.coquelin@redhat.com>

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

  parent reply	other threads:[~2017-10-09 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-10-10  2:31 ` [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171009120734.21611-3-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yliu@fridaylinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).