#define MAX_PKT_BURST 32
-#define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST * 2)
-#define VHOST_MAX_ASYNC_VEC (BUF_VECTOR_MAX * 4)
+#define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST)
+#define VHOST_MAX_ASYNC_VEC 2048
#define PACKED_DESC_ENQUEUE_USED_FLAG(w) \
((w) ? (VRING_DESC_F_AVAIL | VRING_DESC_F_USED | VRING_DESC_F_WRITE) : \
uint32_t count;
};
+/**
+ * inflight async packet information
+ */
+struct async_inflight_info {
+ struct rte_mbuf *mbuf;
+ uint16_t descs; /* num of descs inflight */
+ uint16_t nr_buffers; /* num of buffers inflight for packed ring */
+};
+
struct vhost_async {
/* operation callbacks for DMA */
struct rte_vhost_async_channel_ops ops;
- struct rte_vhost_iov_iter it_pool[VHOST_MAX_ASYNC_IT];
- struct iovec vec_pool[VHOST_MAX_ASYNC_VEC];
+ struct rte_vhost_iov_iter iov_iter[VHOST_MAX_ASYNC_IT];
+ struct rte_vhost_iovec iovec[VHOST_MAX_ASYNC_VEC];
+ uint16_t iter_idx;
+ uint16_t iovec_idx;
/* data transfer status */
struct async_inflight_info *pkts_info;
uint16_t pkts_idx;
uint16_t pkts_inflight_n;
- uint16_t last_pkts_n;
union {
struct vring_used_elem *descs_split;
struct vring_used_elem_packed *buffers_packed;