DPDK  21.11.8
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 "rte_vhost.h"
13 
18  void *src_addr;
19  void *dst_addr;
20  size_t len;
21 };
22 
30  unsigned long nr_segs;
31 };
32 
38  uintptr_t *src_opaque_data;
40  uintptr_t *dst_opaque_data;
41 };
42 
63  int32_t (*transfer_data)(int vid, uint16_t queue_id,
64  struct rte_vhost_iov_iter *iov_iter,
65  struct rte_vhost_async_status *opaque_data,
66  uint16_t count);
80  int32_t (*check_completed_copies)(int vid, uint16_t queue_id,
81  struct rte_vhost_async_status *opaque_data,
82  uint16_t max_packets);
83 };
84 
88 enum {
89  RTE_VHOST_ASYNC_INORDER = 1U << 0,
90 };
91 
96  uint32_t features;
97  uint32_t rsvd[2];
98 };
99 
114 __rte_experimental
115 int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
116  struct rte_vhost_async_config config,
117  struct rte_vhost_async_channel_ops *ops);
118 
129 __rte_experimental
130 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
131 
150 __rte_experimental
151 int rte_vhost_async_channel_register_thread_unsafe(int vid, uint16_t queue_id,
152  struct rte_vhost_async_config config,
153  struct rte_vhost_async_channel_ops *ops);
154 
169 __rte_experimental
170 int rte_vhost_async_channel_unregister_thread_unsafe(int vid,
171  uint16_t queue_id);
172 
189 __rte_experimental
190 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
191  struct rte_mbuf **pkts, uint16_t count);
192 
209 __rte_experimental
210 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
211  struct rte_mbuf **pkts, uint16_t count);
212 
224 __rte_experimental
225 int rte_vhost_async_get_inflight(int vid, uint16_t queue_id);
226 
245 __rte_experimental
246 uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
247  struct rte_mbuf **pkts, uint16_t count);
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif /* _RTE_VHOST_ASYNC_H_ */
struct rte_vhost_iovec * iov
unsigned long nr_segs