vhost: add packed ring into vring struct
authorJin Yu <jin.yu@intel.com>
Wed, 9 Oct 2019 20:48:30 +0000 (04:48 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
This patch add the packed ring in the rte_vhost_vring.

Signed-off-by: Lin Li <lilin24@baidu.com>
Signed-off-by: Xun Ni <nixun@baidu.com>
Signed-off-by: Yu Zhang <zhangyu31@baidu.com>
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/rte_vhost.h

index eaee70c..c2ef65c 100644 (file)
@@ -104,9 +104,18 @@ struct rte_vhost_memory {
 };
 
 struct rte_vhost_vring {
-       struct vring_desc       *desc;
-       struct vring_avail      *avail;
-       struct vring_used       *used;
+       union {
+               struct vring_desc *desc;
+               struct vring_packed_desc *desc_packed;
+       };
+       union {
+               struct vring_avail *avail;
+               struct vring_packed_desc_event *driver_event;
+       };
+       union {
+               struct vring_used *used;
+               struct vring_packed_desc_event *device_event;
+       };
        uint64_t                log_guest_addr;
 
        /** Deprecated, use rte_vhost_vring_call() instead. */