DPDK 21.11.9
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
9extern "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
88enum {
89 RTE_VHOST_ASYNC_INORDER = 1U << 0,
90};
91
96 uint32_t features;
97 uint32_t rsvd[2];
98};
99
114__rte_experimental
115int 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
130int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
131
150__rte_experimental
151int 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
170int rte_vhost_async_channel_unregister_thread_unsafe(int vid,
171 uint16_t queue_id);
172
189__rte_experimental
190uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
191 struct rte_mbuf **pkts, uint16_t count);
192
209__rte_experimental
210uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
211 struct rte_mbuf **pkts, uint16_t count);
212
224__rte_experimental
225int rte_vhost_async_get_inflight(int vid, uint16_t queue_id);
226
245__rte_experimental
246uint16_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_ */
int32_t(* transfer_data)(int vid, uint16_t queue_id, struct rte_vhost_iov_iter *iov_iter, struct rte_vhost_async_status *opaque_data, uint16_t count)
int32_t(* check_completed_copies)(int vid, uint16_t queue_id, struct rte_vhost_async_status *opaque_data, uint16_t max_packets)
unsigned long nr_segs
struct rte_vhost_iovec * iov