DPDK  20.08.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  union {
91  uint32_t intval;
92  struct {
93  uint32_t async_inorder:1;
94  uint32_t resvd_0:15;
95  uint32_t async_threshold:12;
96  uint32_t resvd_1:4;
97  };
98  };
99 };
100 
119 __rte_experimental
120 int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
121  uint32_t features, struct rte_vhost_async_channel_ops *ops);
122 
133 __rte_experimental
134 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
135 
152 __rte_experimental
153 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
154  struct rte_mbuf **pkts, uint16_t count);
155 
172 __rte_experimental
173 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
174  struct rte_mbuf **pkts, uint16_t count);
175 
176 #endif /* _RTE_VHOST_ASYNC_H_ */
uint32_t(* transfer_data)(int vid, uint16_t queue_id, struct rte_vhost_async_desc *descs, struct rte_vhost_async_status *opaque_data, uint16_t count)
struct iovec * iov
uint32_t(* check_completed_copies)(int vid, uint16_t queue_id, struct rte_vhost_async_status *opaque_data, uint16_t max_packets)
struct rte_vhost_iov_iter * dst
struct rte_vhost_iov_iter * src
unsigned long nr_segs