DPDK  21.05.0
rte_vhost_async.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Intel Corporation
3  */
4 
5 #ifndef _RTE_VHOST_ASYNC_H_
6 #define _RTE_VHOST_ASYNC_H_
7 
8 #include "rte_vhost.h"
9 
15  size_t offset;
17  size_t count;
19  struct iovec *iov;
21  unsigned long nr_segs;
22 };
23 
32 };
33 
39  uintptr_t *src_opaque_data;
41  uintptr_t *dst_opaque_data;
42 };
43 
64  uint32_t (*transfer_data)(int vid, uint16_t queue_id,
65  struct rte_vhost_async_desc *descs,
66  struct rte_vhost_async_status *opaque_data,
67  uint16_t count);
81  uint32_t (*check_completed_copies)(int vid, uint16_t queue_id,
82  struct rte_vhost_async_status *opaque_data,
83  uint16_t max_packets);
84 };
85 
90  struct rte_mbuf *mbuf;
91  uint16_t descs; /* num of descs inflight */
92  uint16_t nr_buffers; /* num of buffers inflight for packed ring */
93 };
94 
99  union {
100  uint32_t intval;
101  struct {
102  uint32_t async_inorder:1;
103  uint32_t resvd_0:15;
104  uint32_t async_threshold:12;
105  uint32_t resvd_1:4;
106  };
107  };
108 };
109 
128 __rte_experimental
129 int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
130  uint32_t features, struct rte_vhost_async_channel_ops *ops);
131 
142 __rte_experimental
143 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
144 
171 __rte_experimental
172 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
173  struct rte_mbuf **pkts, uint16_t count,
174  struct rte_mbuf **comp_pkts, uint32_t *comp_count);
175 
192 __rte_experimental
193 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
194  struct rte_mbuf **pkts, uint16_t count);
195 
196 #endif /* _RTE_VHOST_ASYNC_H_ */
struct iovec * iov
struct rte_vhost_iov_iter * dst
struct rte_vhost_iov_iter * src
unsigned long nr_segs