[dpdk-dev,RFC,05/11] vhost: set desc addr for 1.1

Message ID 1493992642-52756-6-git-send-email-jfreiman@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: Yuanhan Liu
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jens Freimann May 5, 2017, 1:57 p.m. UTC
  From: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/vhost.h      | 1 +
 lib/librte_vhost/vhost_user.c | 1 +
 2 files changed, 2 insertions(+)
  

Patch

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 208b2eb..f3b7ad5 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -86,6 +86,7 @@  struct zcopy_mbuf {
  */
 struct vhost_virtqueue {
 	struct vring_desc	*desc;
+	struct vring_desc_1_1   *desc_1_1;
 	struct vring_avail	*avail;
 	struct vring_used	*used;
 	uint32_t		size;
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 5c8058b..3b05355 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -349,6 +349,7 @@ 
 			dev->vid);
 		return -1;
 	}
+	vq->desc_1_1 = (struct vring_desc_1_1 *)vq->desc_1_1;
 
 	dev = numa_realloc(dev, addr->index);
 	vq = dev->virtqueue[addr->index];