DPDK  24.03.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 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include <stdint.h>
13 
14 #include <rte_compat.h>
15 #include <rte_mbuf.h>
16 
27 __rte_experimental
28 int rte_vhost_async_channel_register(int vid, uint16_t queue_id);
29 
40 __rte_experimental
41 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
42 
57 __rte_experimental
58 int rte_vhost_async_channel_register_thread_unsafe(int vid, uint16_t queue_id);
59 
74 __rte_experimental
75 int rte_vhost_async_channel_unregister_thread_unsafe(int vid,
76  uint16_t queue_id);
77 
98 __rte_experimental
99 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
100  struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
101  uint16_t vchan_id);
102 
123 __rte_experimental
124 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
125  struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
126  uint16_t vchan_id);
127 
139 __rte_experimental
140 int rte_vhost_async_get_inflight(int vid, uint16_t queue_id);
141 
156 __rte_experimental
157 int rte_vhost_async_get_inflight_thread_unsafe(int vid, uint16_t queue_id);
158 
181 __rte_experimental
182 uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
183  struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
184  uint16_t vchan_id);
185 
206 __rte_experimental
207 uint16_t rte_vhost_clear_queue(int vid, uint16_t queue_id,
208  struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
209  uint16_t vchan_id);
210 
229 __rte_experimental
230 int rte_vhost_async_dma_configure(int16_t dma_id, uint16_t vchan_id);
231 
263 __rte_experimental
264 uint16_t
265 rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,
266  struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count,
267  int *nr_inflight, int16_t dma_id, uint16_t vchan_id);
268 
285 __rte_experimental
286 int
287 rte_vhost_async_dma_unconfigure(int16_t dma_id, uint16_t vchan_id);
288 
289 #ifdef __cplusplus
290 }
291 #endif
292 
293 #endif /* _RTE_VHOST_ASYNC_H_ */