summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Yu <jin.yu@intel.com>2019-10-10 04:48:31 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-20 15:43:27 +0100
commitb279d85582b3f5f90dfd0dd9e4852bb6a212070a (patch)
tree151215b1ec5eb9451faf6f97e2dee76248a1acf2
parent9ef8a4c56b813e0e17b4b93235e0c0ee47af6051 (diff)
downloaddpdk-next-net-intel-b279d85582b3f5f90dfd0dd9e4852bb6a212070a.zip
dpdk-next-net-intel-b279d85582b3f5f90dfd0dd9e4852bb6a212070a.tar.gz
dpdk-next-net-intel-b279d85582b3f5f90dfd0dd9e4852bb6a212070a.tar.xz
vhost: add inflight structures
This patch adds the inflight queue region structure include the split and packed. 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>
-rw-r--r--lib/librte_vhost/rte_vhost.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index c2ef65c..7ed971b 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -103,6 +103,49 @@ struct rte_vhost_memory {
struct rte_vhost_mem_region regions[];
};
+struct rte_vhost_inflight_desc_split {
+ uint8_t inflight;
+ uint8_t padding[5];
+ uint16_t next;
+ uint64_t counter;
+};
+
+struct rte_vhost_inflight_info_split {
+ uint64_t features;
+ uint16_t version;
+ uint16_t desc_num;
+ uint16_t last_inflight_io;
+ uint16_t used_idx;
+ struct rte_vhost_inflight_desc_split desc[0];
+};
+
+struct rte_vhost_inflight_desc_packed {
+ uint8_t inflight;
+ uint8_t padding;
+ uint16_t next;
+ uint16_t last;
+ uint16_t num;
+ uint64_t counter;
+ uint16_t id;
+ uint16_t flags;
+ uint32_t len;
+ uint64_t addr;
+};
+
+struct rte_vhost_inflight_info_packed {
+ uint64_t features;
+ uint16_t version;
+ uint16_t desc_num;
+ uint16_t free_head;
+ uint16_t old_free_head;
+ uint16_t used_idx;
+ uint16_t old_used_idx;
+ uint8_t used_wrap_counter;
+ uint8_t old_used_wrap_counter;
+ uint8_t padding[7];
+ struct rte_vhost_inflight_desc_packed desc[0];
+};
+
struct rte_vhost_vring {
union {
struct vring_desc *desc;