FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
vhost_user.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __VIRTIO_VHOST_USER_H__
16 #define __VIRTIO_VHOST_USER_H__
17 
20 
21 /* vhost-user data structures */
22 
23 #define VHOST_MEMORY_MAX_NREGIONS 8
24 #define VHOST_USER_MSG_HDR_SZ 12
25 #define VHOST_VRING_INIT_MQ_PAIR_SZ 8 //8TX + 8RX
26 
27 /*
28  * qid is one byte in size in the spec. Please see VHOST_USER_SET_VRING_CALL,
29  * VHOST_USER_SET_VRING_KICK, and VHOST_USER_SET_VRING_ERR.
30  * The max number for q pair is naturally 128.
31  */
32 #define VHOST_VRING_MAX_MQ_PAIR_SZ 128
33 #define VHOST_VRING_IDX_RX(qid) (2 * (qid))
34 #define VHOST_VRING_IDX_TX(qid) (2 * (qid) + 1)
35 
36 #define VHOST_USER_VRING_NOFD_MASK 0x100
37 
38 #define VHOST_USER_PROTOCOL_F_MQ 0
39 #define VHOST_USER_PROTOCOL_F_LOG_SHMFD 1
40 #define VHOST_VRING_F_LOG 0
41 
42 #define VHOST_USER_PROTOCOL_FEATURES ((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
43  (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD))
44 
45 #define vu_log_debug(dev, f, ...) \
46 { \
47  vlib_log(VLIB_LOG_LEVEL_DEBUG, vhost_user_main.log_default, "%U: " f, \
48  format_vnet_hw_if_index_name, vnet_get_main(), \
49  dev->hw_if_index, ##__VA_ARGS__); \
50 };
51 
52 #define vu_log_warn(dev, f, ...) \
53 { \
54  vlib_log(VLIB_LOG_LEVEL_WARNING, vhost_user_main.log_default, "%U: " f, \
55  format_vnet_hw_if_index_name, vnet_get_main(), \
56  dev->hw_if_index, ##__VA_ARGS__); \
57 };
58 #define vu_log_err(dev, f, ...) \
59 { \
60  vlib_log(VLIB_LOG_LEVEL_ERR, vhost_user_main.log_default, "%U: " f, \
61  format_vnet_hw_if_index_name, vnet_get_main(), \
62  dev->hw_if_index, ##__VA_ARGS__); \
63 };
64 
65 #define UNIX_GET_FD(unixfd_idx) ({ \
66  typeof(unixfd_idx) __unixfd_idx = (unixfd_idx); \
67  (__unixfd_idx != ~0) ? \
68  pool_elt_at_index (file_main.file_pool, \
69  __unixfd_idx)->file_descriptor : -1; })
70 
71 #define foreach_virtio_trace_flags \
72  _ (SIMPLE_CHAINED, 0, "Simple descriptor chaining") \
73  _ (SINGLE_DESC, 1, "Single descriptor packet") \
74  _ (INDIRECT, 2, "Indirect descriptor") \
75  _ (MAP_ERROR, 4, "Memory mapping error")
76 
77 typedef enum
78 {
79 #define _(n,i,s) VIRTIO_TRACE_F_##n,
81 #undef _
83 
84 #define FEATURE_VIRTIO_NET_F_HOST_TSO_FEATURE_BITS \
85  (VIRTIO_FEATURE (VIRTIO_NET_F_CSUM) | \
86  VIRTIO_FEATURE (VIRTIO_NET_F_HOST_UFO) | \
87  VIRTIO_FEATURE (VIRTIO_NET_F_HOST_TSO4) | \
88  VIRTIO_FEATURE (VIRTIO_NET_F_HOST_TSO6))
89 
90 #define FEATURE_VIRTIO_NET_F_GUEST_TSO_FEATURE_BITS \
91  (VIRTIO_FEATURE (VIRTIO_NET_F_GUEST_CSUM) | \
92  VIRTIO_FEATURE (VIRTIO_NET_F_GUEST_UFO) | \
93  VIRTIO_FEATURE (VIRTIO_NET_F_GUEST_TSO4) | \
94  VIRTIO_FEATURE (VIRTIO_NET_F_GUEST_TSO6))
95 
96 #define FEATURE_VIRTIO_NET_F_HOST_GUEST_TSO_FEATURE_BITS \
97  (FEATURE_VIRTIO_NET_F_HOST_TSO_FEATURE_BITS | \
98  FEATURE_VIRTIO_NET_F_GUEST_TSO_FEATURE_BITS)
99 
100 
101 typedef struct
102 {
106  u8 hwaddr[6];
113 
114  /* return */
117 
124 
125 /* *INDENT-OFF* */
127 {
132 } __attribute ((packed)) vhost_user_memory_region_t;
133 
134 typedef struct vhost_user_memory
135 {
138  vhost_user_memory_region_t regions[VHOST_MEMORY_MAX_NREGIONS];
139 } __attribute ((packed)) vhost_user_memory_t;
140 
141 typedef enum vhost_user_req
142 {
164 
165 typedef struct vhost_user_msg {
169  union
170  {
174  vhost_user_memory_t memory;
176  };
177 } __attribute ((packed)) vhost_user_msg_t;
178 /* *INDENT-ON* */
179 
180 typedef struct
181 {
182  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
187  union
188  {
190  vring_packed_desc_t *packed_desc;
191  };
192  union
193  {
195  vring_desc_event_t *avail_event;
196  };
197  union
198  {
200  vring_desc_event_t *used_event;
201  };
210 
211  //Put non-runtime in a different cache line
212  CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
213  int errfd;
217 
218  /* The rx queue policy (interrupt/adaptive/polling) for this queue */
220 
221  /*
222  * It contains the device queue number. -1 if it does not. The idea is
223  * to not invoke vnet_hw_interface_assign_rx_thread and
224  * vnet_hw_interface_unassign_rx_thread more than once for the duration of
225  * the interface even if it is disconnected and reconnected.
226  */
228 
236 
237 #define VHOST_USER_EVENT_START_TIMER 1
238 #define VHOST_USER_EVENT_STOP_TIMER 2
239 
240 typedef struct
241 {
242  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
247  char sock_filename[256];
250  u32 hw_if_index, sw_if_index;
251 
252  //Feature negotiation
256 
257  //Memory region information
259  vhost_user_memory_region_t regions[VHOST_MEMORY_MAX_NREGIONS];
260  void *region_mmap_addr[VHOST_MEMORY_MAX_NREGIONS];
261  u64 region_guest_addr_lo[VHOST_MEMORY_MAX_NREGIONS];
262  u64 region_guest_addr_hi[VHOST_MEMORY_MAX_NREGIONS];
264 
265  //Virtual rings
267 
268  /*
269  * vrings is a dynamic array. It may have more elements than it is
270  * currently used. num_qid indicates the current total qid's in the
271  * vrings. For example, vec_len(vrings) = 64, num_qid = 60, so the
272  * current valid/used qid is (0, 59) in the vrings array.
273  */
275 
278 
281 
283 
284  /* Packed ring configured */
286 
289 
290 #define FOR_ALL_VHOST_TXQ(qid, vui) for (qid = 1; qid < vui->num_qid; qid += 2)
291 
292 #define FOR_ALL_VHOST_RXQ(qid, vui) for (qid = 0; qid < vui->num_qid; qid += 2)
293 
294 #define FOR_ALL_VHOST_RX_TXQ(qid, vui) for (qid = 0; qid < vui->num_qid; qid++)
295 
296 typedef struct
297 {
301 } vhost_copy_t;
302 
303 typedef struct
304 {
305  u16 qid; /** The interface queue index (Not the virtio vring idx) */
306  u16 device_index; /** The device index */
307  u32 virtio_ring_flags; /** Runtime queue flags **/
308  u16 first_desc_len; /** Length of the first data descriptor **/
309  virtio_net_hdr_mrg_rxbuf_t hdr; /** Virtio header **/
310 } vhost_trace_t;
311 
312 #define VHOST_USER_RX_BUFFERS_N (2 * VLIB_FRAME_SIZE + 2)
313 #define VHOST_USER_COPY_ARRAY_N (4 * VLIB_FRAME_SIZE)
314 
315 typedef struct
316 {
319 
320  virtio_net_hdr_mrg_rxbuf_t tx_headers[VLIB_FRAME_SIZE];
322 
323  /* This is here so it doesn't end-up
324  * using stack or registers. */
326 
330 } vhost_cpu_t;
331 
332 typedef struct
333 {
341 
342  /** Per-CPU data for vhost-user */
344 
345  /** Pseudo random iterator */
347 
348  /* The number of rx interface/queue pairs in interrupt mode */
350 
351  /* logging */
353 
354  /* gso interface count */
357 
358 typedef struct
359 {
360  u8 if_name[64];
365  u8 sock_filename[256];
369 
371  vhost_user_intf_details_t ** out_vuids);
373  vhost_user_vring_t *txvq);
374 
379 
380 #endif
381 
382 /*
383  * fd.io coding-style-patch-verification: ON
384  *
385  * Local Variables:
386  * eval: (c-set-style "gnu")
387  * End:
388  */
vhost_trace_t::qid
u16 qid
Definition: vhost_user.h:305
vhost_user_create_if_args_t::is_server
u8 is_server
Definition: vhost_user.h:108
vhost_user_create_if_args_t::custom_dev_instance
u32 custom_dev_instance
Definition: vhost_user.h:105
vhost_user_req
vhost_user_req
Definition: vhost_user.h:141
vhost_user_msg::request
vhost_user_req_t request
Definition: vhost_user.h:166
vhost_user_vring_t
Definition: vhost_user.h:180
vhost_user_vring_t::mode
u32 mode
Definition: vhost_user.h:219
vhost_user_intf_t::nregions
u32 nregions
Definition: vhost_user.h:258
VHOST_USER_SET_VRING_KICK
@ VHOST_USER_SET_VRING_KICK
Definition: vhost_user.h:155
vhost_cpu_t::rx_buffers_pdesc
vlib_buffer_t ** rx_buffers_pdesc
Definition: vhost_user.h:328
vhost_user_intf_t::enable_event_idx
u8 enable_event_idx
Definition: vhost_user.h:287
vnet_device_class_t
struct _vnet_device_class vnet_device_class_t
vhost_user_memory_region::guest_phys_addr
u64 guest_phys_addr
Definition: vhost_user.h:128
vhost_cpu_t::to_next_list
u32 * to_next_list
Definition: vhost_user.h:327
vhost_user_intf_t::features
u64 features
Definition: vhost_user.h:253
vhost_user_memory_region::memory_size
u64 memory_size
Definition: vhost_user.h:129
vhost_user_vring_t::avail_wrap_counter
u16 avail_wrap_counter
Definition: vhost_user.h:230
regions
vhost_user_memory_region_t regions[VHOST_MEMORY_MAX_NREGIONS]
Definition: vhost_user.h:125
vhost_user_main_t::ifq_count
u32 ifq_count
Definition: vhost_user.h:349
VHOST_MEMORY_MAX_NREGIONS
#define VHOST_MEMORY_MAX_NREGIONS
Definition: vhost_user.h:23
vhost_user_msg::state
vhost_vring_state_t state
Definition: vhost_user.h:172
CLIB_CACHE_LINE_ALIGN_MARK
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
Definition: cache.h:60
vlib_log_class_t
u32 vlib_log_class_t
Definition: vlib.h:52
vhost_user_create_if_args_t::enable_gso
u8 enable_gso
Definition: vhost_user.h:109
vhost_user_main_t
Definition: vhost_user.h:332
vhost_user_device_class
vnet_device_class_t vhost_user_device_class
vhost_copy_t::dst
uword dst
Definition: vhost_user.h:298
vhost_user_intf_t::log_base_addr
void * log_base_addr
Definition: vhost_user.h:279
VLIB_FRAME_SIZE
#define VLIB_FRAME_SIZE
Definition: node.h:368
vhost_user_set_operation_mode
void vhost_user_set_operation_mode(vhost_user_intf_t *vui, vhost_user_vring_t *txvq)
Definition: vhost_user.c:385
vhost_user_vring_t::thread_index
u32 thread_index
Definition: vhost_user.h:234
mhash_t
Definition: mhash.h:46
VHOST_USER_SET_LOG_FD
@ VHOST_USER_SET_LOG_FD
Definition: vhost_user.h:150
vhost_user_memory_region
Definition: vhost_user.h:126
vhost_user_create_if_args_t
Definition: vhost_user.h:101
u16
unsigned short u16
Definition: types.h:57
vhost_trace_t::device_index
u16 device_index
The interface queue index (Not the virtio vring idx)
Definition: vhost_user.h:306
vhost_user_intf_t::sock_errno
int sock_errno
Definition: vhost_user.h:248
foreach_virtio_trace_flags
#define foreach_virtio_trace_flags
Definition: vhost_user.h:71
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
vhost_user_vring_t::started
u8 started
Definition: vhost_user.h:206
vhost_user_main_t::coalesce_time
f64 coalesce_time
Definition: vhost_user.h:339
vhost_user_create_if_args_t::enable_packed
u8 enable_packed
Definition: vhost_user.h:110
vhost_user_vring_t::first_kick
u8 first_kick
Definition: vhost_user.h:232
vhost_user_intf_details_t::is_server
u8 is_server
Definition: vhost_user.h:364
vhost_user_create_if_args_t::use_custom_mac
u8 use_custom_mac
Definition: vhost_user.h:112
vhost_user_intf_t::log_size
u64 log_size
Definition: vhost_user.h:280
vhost_user_vring_t::avail_event
vring_desc_event_t * avail_event
Definition: vhost_user.h:195
VHOST_USER_NONE
@ VHOST_USER_NONE
Definition: vhost_user.h:143
vhost_user_memory_region::mmap_offset
u64 mmap_offset
Definition: vhost_user.h:131
vhost_cpu_t
Definition: vhost_user.h:315
vhost_user_intf_details_t::virtio_net_hdr_sz
u32 virtio_net_hdr_sz
Definition: vhost_user.h:362
vhost_user_input_node
vlib_node_registration_t vhost_user_input_node
(constructor) VLIB_REGISTER_NODE (vhost_user_input_node)
Definition: vhost_user_input.c:1450
VHOST_USER_SET_VRING_NUM
@ VHOST_USER_SET_VRING_NUM
Definition: vhost_user.h:151
vhost_user_memory::regions
vhost_user_memory_region_t regions[VHOST_MEMORY_MAX_NREGIONS]
Definition: vhost_user.h:138
VHOST_USER_GET_PROTOCOL_FEATURES
@ VHOST_USER_GET_PROTOCOL_FEATURES
Definition: vhost_user.h:158
vhost_user_log_t
Definition: vhost_std.h:55
VHOST_USER_SET_LOG_BASE
@ VHOST_USER_SET_LOG_BASE
Definition: vhost_user.h:149
vhost_user_msg::flags
u32 flags
Definition: vhost_user.h:167
vhost_user_intf_t::sw_if_index
u32 sw_if_index
Definition: vhost_user.h:250
vhost_copy_t
Definition: vhost_user.h:296
VHOST_USER_SET_PROTOCOL_FEATURES
@ VHOST_USER_SET_PROTOCOL_FEATURES
Definition: vhost_user.h:159
i16
signed short i16
Definition: types.h:46
vhost_vring_state_t
Definition: vhost_std.h:33
vhost_user_modify_if
int vhost_user_modify_if(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_create_if_args_t *args)
Definition: vhost_user.c:1725
vhost_user_intf_details_t::sock_errno
int sock_errno
Definition: vhost_user.h:367
vhost_user_vring_t::qid
i16 qid
Definition: vhost_user.h:227
vring_desc_t
Definition: virtio_std.h:93
vhost_std.h
vhost_trace_t::virtio_ring_flags
u32 virtio_ring_flags
The device index.
Definition: vhost_user.h:307
vhost_user_memory
Definition: vhost_user.h:134
vhost_trace_t::hdr
virtio_net_hdr_mrg_rxbuf_t hdr
Length of the first data descriptor.
Definition: vhost_user.h:309
virtio_std.h
clib_spinlock_s
Definition: lock.h:51
vhost_user_vring_t::log_guest_addr
u64 log_guest_addr
Definition: vhost_user.h:216
virtio_trace_flag_t
virtio_trace_flag_t
Definition: vhost_user.h:77
uword
u64 uword
Definition: types.h:112
vhost_copy_t::src
uword src
Definition: vhost_user.h:299
vhost_cpu_t::current_trace
vhost_trace_t * current_trace
Definition: vhost_user.h:325
vhost_user_memory::padding
u32 padding
Definition: vhost_user.h:137
vhost_user_vring_t::last_used_idx
u16 last_used_idx
Definition: vhost_user.h:185
vhost_user_main_t::coalesce_frames
u32 coalesce_frames
Definition: vhost_user.h:338
f64
double f64
Definition: types.h:142
vhost_user_vring_t::packed_desc
vring_packed_desc_t * packed_desc
Definition: vhost_user.h:190
vhost_user_intf_details_t::features
u64 features
Definition: vhost_user.h:363
vhost_user_intf_t::clib_file_index
u32 clib_file_index
Definition: vhost_user.h:246
vhost_user_vring_t::int_deadline
f64 int_deadline
Definition: vhost_user.h:205
vhost_user_intf_t::vrings
vhost_user_vring_t * vrings
Definition: vhost_user.h:266
vhost_user_vring_t::last_avail_idx
u16 last_avail_idx
Definition: vhost_user.h:184
VHOST_USER_SET_VRING_BASE
@ VHOST_USER_SET_VRING_BASE
Definition: vhost_user.h:153
vhost_user_intf_t::is_ready
u32 is_ready
Definition: vhost_user.h:243
VHOST_USER_SET_FEATURES
@ VHOST_USER_SET_FEATURES
Definition: vhost_user.h:145
VHOST_USER_MAX
@ VHOST_USER_MAX
Definition: vhost_user.h:162
vhost_user_msg::u64
u64 u64
Definition: vhost_user.h:171
vhost_cpu_t::polling_q_count
u32 polling_q_count
Definition: vhost_user.h:329
vhost_user_create_if_args_t::enable_event_idx
u8 enable_event_idx
Definition: vhost_user.h:111
VHOST_USER_SET_OWNER
@ VHOST_USER_SET_OWNER
Definition: vhost_user.h:146
vhost_user_vring_t::callfd_idx
u32 callfd_idx
Definition: vhost_user.h:214
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
vhost_user_main_t::cpus
vhost_cpu_t * cpus
Per-CPU data for vhost-user.
Definition: vhost_user.h:343
vhost_user_create_if
int vhost_user_create_if(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_create_if_args_t *args)
Definition: vhost_user.c:1669
vhost_user_vring_t::desc_user_addr
uword desc_user_addr
Definition: vhost_user.h:202
vhost_user_vring_t::desc
vring_desc_t * desc
Definition: vhost_user.h:189
vhost_user_vring_t::avail
vring_avail_t * avail
Definition: vhost_user.h:194
vhost_user_vring_t::used_user_addr
uword used_user_addr
Definition: vhost_user.h:203
VHOST_USER_GET_VRING_BASE
@ VHOST_USER_GET_VRING_BASE
Definition: vhost_user.h:154
vhost_user_main_t::gso_count
u32 gso_count
Definition: vhost_user.h:355
vhost_user_intf_t::enable_gso
u8 enable_gso
Definition: vhost_user.h:282
VHOST_USER_COPY_ARRAY_N
#define VHOST_USER_COPY_ARRAY_N
Definition: vhost_user.h:313
vhost_user_vring_t::used_event
vring_desc_event_t * used_event
Definition: vhost_user.h:200
vhost_user_memory::nregions
u32 nregions
Definition: vhost_user.h:136
vnet_main_t
Definition: vnet.h:76
vhost_user_delete_if
int vhost_user_delete_if(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index)
Definition: vhost_user.c:1433
vhost_user_intf_t::if_index
uword if_index
Definition: vhost_user.h:249
vring_avail_t
Definition: virtio_std.h:101
vhost_user_vring_t::log_used
u8 log_used
Definition: vhost_user.h:208
vhost_user_intf_t::admin_up
u32 admin_up
Definition: vhost_user.h:244
vhost_user_msg::addr
vhost_vring_addr_t addr
Definition: vhost_user.h:173
vhost_user_intf_t::virtio_net_hdr_sz
int virtio_net_hdr_sz
Definition: vhost_user.h:276
vhost_user_vring_t::enabled
u8 enabled
Definition: vhost_user.h:207
u64
unsigned long u64
Definition: types.h:89
vhost_user_main_t::show_dev_instance_by_real_dev_instance
u32 * show_dev_instance_by_real_dev_instance
Definition: vhost_user.h:337
VHOST_USER_RESET_OWNER
@ VHOST_USER_RESET_OWNER
Definition: vhost_user.h:147
u32
unsigned int u32
Definition: types.h:88
vhost_user_dump_ifs
int vhost_user_dump_ifs(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_intf_details_t **out_vuids)
Definition: vhost_user.c:1890
vhost_trace_t
Definition: vhost_user.h:303
vhost_user_create_if_args_t::feature_mask
u64 feature_mask
Definition: vhost_user.h:104
vhost_user_send_interrupt_node
vlib_node_registration_t vhost_user_send_interrupt_node
(constructor) VLIB_REGISTER_NODE (vhost_user_send_interrupt_node)
Definition: vhost_user.c:53
vhost_user_vring_t::used_wrap_counter
u16 used_wrap_counter
Definition: vhost_user.h:229
vhost_user_main_t::mtu_bytes
u32 mtu_bytes
Definition: vhost_user.h:335
vhost_user_intf_t::protocol_features
u64 protocol_features
Definition: vhost_user.h:255
vhost_user_intf_t::enable_packed
u8 enable_packed
Definition: vhost_user.h:285
vhost_user_intf_t::unix_server_index
u32 unix_server_index
Definition: vhost_user.h:245
vlib_main_t
Definition: main.h:102
vhost_user_intf_t
Definition: vhost_user.h:240
vhost_user_msg
Definition: vhost_user.h:165
vhost_user_intf_details_t::num_regions
u32 num_regions
Definition: vhost_user.h:366
u8
unsigned char u8
Definition: types.h:56
VHOST_USER_SET_VRING_ENABLE
@ VHOST_USER_SET_VRING_ENABLE
Definition: vhost_user.h:161
vhost_user_intf_t::feature_mask
u64 feature_mask
Definition: vhost_user.h:254
vhost_user_vring_t::vring_lock
clib_spinlock_t vring_lock
Definition: vhost_user.h:209
vhost_user_vring_t::kickfd_idx
u32 kickfd_idx
Definition: vhost_user.h:215
vhost_user_create_if_args_t::sock_filename
char * sock_filename
Definition: vhost_user.h:103
vhost_user_req_t
enum vhost_user_req vhost_user_req_t
vhost_user_create_if_args_t::sw_if_index
u32 sw_if_index
Definition: vhost_user.h:115
VHOST_USER_GET_FEATURES
@ VHOST_USER_GET_FEATURES
Definition: vhost_user.h:144
vhost_user_main_t::vhost_user_interfaces
vhost_user_intf_t * vhost_user_interfaces
Definition: vhost_user.h:336
vhost_user_vring_t::used
vring_used_t * used
Definition: vhost_user.h:199
vhost_user_msg::size
u32 size
Definition: vhost_user.h:168
vhost_user_main_t::log_default
vlib_log_class_t log_default
Definition: vhost_user.h:352
vhost_user_intf_details_t::sw_if_index
u32 sw_if_index
Definition: vhost_user.h:361
vhost_user_memory_region::userspace_addr
u64 userspace_addr
Definition: vhost_user.h:130
vhost_trace_t::first_desc_len
u16 first_desc_len
Runtime queue flags
Definition: vhost_user.h:308
VHOST_USER_GET_QUEUE_NUM
@ VHOST_USER_GET_QUEUE_NUM
Definition: vhost_user.h:160
vhost_user_msg::memory
vhost_user_memory_t memory
Definition: vhost_user.h:174
vhost_user_msg::log
vhost_user_log_t log
Definition: vhost_user.h:175
VHOST_USER_SET_VRING_ERR
@ VHOST_USER_SET_VRING_ERR
Definition: vhost_user.h:157
vhost_user_main
vhost_user_main_t vhost_user_main
Definition: vhost_user.c:56
VHOST_USER_SET_VRING_CALL
@ VHOST_USER_SET_VRING_CALL
Definition: vhost_user.h:156
vhost_user_intf_t::is_any_layout
int is_any_layout
Definition: vhost_user.h:277
vhost_user_main_t::dont_dump_vhost_user_memory
int dont_dump_vhost_user_memory
Definition: vhost_user.h:340
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vhost_user_intf_t::num_qid
u32 num_qid
Definition: vhost_user.h:274
vhost_user_vring_t::qsz_mask
u16 qsz_mask
Definition: vhost_user.h:183
vhost_user_main_t::random
u32 random
Pseudo random iterator.
Definition: vhost_user.h:346
vhost_vring_addr_t
Definition: vhost_std.h:45
vhost_user_vring_t::errfd
int errfd
Definition: vhost_user.h:213
vhost_user_intf_details_t
Definition: vhost_user.h:358
vhost_copy_t::len
u32 len
Definition: vhost_user.h:300
vhost_user_vring_t::last_kick
u16 last_kick
Definition: vhost_user.h:231
VHOST_USER_SET_MEM_TABLE
@ VHOST_USER_SET_MEM_TABLE
Definition: vhost_user.h:148
VHOST_USER_RX_BUFFERS_N
#define VHOST_USER_RX_BUFFERS_N
Definition: vhost_user.h:312
vhost_user_create_if_args_t::renumber
u8 renumber
Definition: vhost_user.h:107
vhost_user_vring_t::avail_user_addr
uword avail_user_addr
Definition: vhost_user.h:204
vhost_user_vring_t::queue_index
u32 queue_index
Definition: vhost_user.h:233
vhost_user_main_t::if_index_by_sock_name
mhash_t if_index_by_sock_name
Definition: vhost_user.h:334
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111
VHOST_USER_SET_VRING_ADDR
@ VHOST_USER_SET_VRING_ADDR
Definition: vhost_user.h:152
vhost_cpu_t::rx_buffers_len
u32 rx_buffers_len
Definition: vhost_user.h:317
vring_used_t
Definition: virtio_std.h:115
vhost_user_vring_t::n_since_last_int
u16 n_since_last_int
Definition: vhost_user.h:186