DPDK  21.02.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 };
93 
98  union {
99  uint32_t intval;
100  struct {
101  uint32_t async_inorder:1;
102  uint32_t resvd_0:15;
103  uint32_t async_threshold:12;
104  uint32_t resvd_1:4;
105  };
106  };
107 };
108 
127 __rte_experimental
128 int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
129  uint32_t features, struct rte_vhost_async_channel_ops *ops);
130 
141 __rte_experimental
142 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
143 
170 __rte_experimental
171 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
172  struct rte_mbuf **pkts, uint16_t count,
173  struct rte_mbuf **comp_pkts, uint32_t *comp_count);
174 
191 __rte_experimental
192 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
193  struct rte_mbuf **pkts, uint16_t count);
194 
195 #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