DPDK  20.11.10
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 info;
92  struct {
93  uint16_t descs; /* num of descs inflight */
94  uint16_t segs; /* iov segs inflight */
95  };
96  };
97 };
98 
103  union {
104  uint32_t intval;
105  struct {
106  uint32_t async_inorder:1;
107  uint32_t resvd_0:15;
108  uint32_t async_threshold:12;
109  uint32_t resvd_1:4;
110  };
111  };
112 };
113 
132 __rte_experimental
133 int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
134  uint32_t features, struct rte_vhost_async_channel_ops *ops);
135 
146 __rte_experimental
147 int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
148 
165 __rte_experimental
166 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
167  struct rte_mbuf **pkts, uint16_t count);
168 
185 __rte_experimental
186 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
187  struct rte_mbuf **pkts, uint16_t count);
188 
189 #endif /* _RTE_VHOST_ASYNC_H_ */
struct iovec * iov
struct rte_vhost_iov_iter * dst
struct rte_vhost_iov_iter * src
unsigned long nr_segs