![]() |
FD.io VPP
v17.04-9-g99c0734
Vector Packet Processing
|
vHost User Device Driver. More...
Include dependency graph for vhost-user.c:Go to the source code of this file.
Macros | |
| #define | VHOST_USER_DEBUG_SOCKET 0 |
| #define | VHOST_DEBUG_VQ 0 |
| #define | DBG_SOCK(args...) |
| #define | DBG_VQ(args...) |
| #define | VHOST_USER_DOWN_DISCARD_COUNT 256 |
| #define | VHOST_USER_RX_BUFFER_STARVATION 32 |
| #define | VHOST_USER_RX_COPY_THRESHOLD 64 |
| #define | UNIX_GET_FD(unixfd_idx) |
| #define | foreach_virtio_trace_flags |
| #define | foreach_vhost_user_tx_func_error |
| #define | foreach_vhost_user_input_func_error |
| #define | VHOST_LOG_PAGE 0x1000 |
| #define | vhost_user_log_dirty_ring(vui, vq, member) |
| #define | foreach_protocol_feature |
Enumerations | |
| enum | virtio_trace_flag_t { foreach_virtio_trace_flags } |
| enum | vhost_user_tx_func_error_t { VHOST_USER_TX_FUNC_N_ERROR } |
| enum | vhost_user_input_func_error_t { VHOST_USER_INPUT_FUNC_N_ERROR } |
Variables | |
| vlib_node_registration_t | vhost_user_input_node |
| (constructor) VLIB_REGISTER_NODE (vhost_user_input_node) More... | |
| static char * | vhost_user_tx_func_error_strings [] |
| static char * | vhost_user_input_func_error_strings [] |
| static vhost_user_main_t | vhost_user_main |
| static vlib_node_registration_t | vhost_user_process_node |
| (constructor) VLIB_REGISTER_NODE (vhost_user_process_node) More... | |
| static vlib_node_registration_t | vhost_user_send_interrupt_node |
| (constructor) VLIB_REGISTER_NODE (vhost_user_send_interrupt_node) More... | |
| static vlib_cli_command_t | vhost_user_connect_command |
| (constructor) VLIB_CLI_COMMAND (vhost_user_connect_command) More... | |
| static vlib_cli_command_t | vhost_user_delete_command |
| (constructor) VLIB_CLI_COMMAND (vhost_user_delete_command) More... | |
| static vlib_cli_command_t | show_vhost_user_command |
| (constructor) VLIB_CLI_COMMAND (show_vhost_user_command) More... | |
| static vlib_cli_command_t | vhost_user_thread_command |
| (constructor) VLIB_CLI_COMMAND (vhost_user_thread_command) More... | |
vHost User Device Driver.
This file contains the source code for vHost User interface.
Definition in file vhost-user.c.
| #define DBG_SOCK | ( | args... | ) |
Definition at line 58 of file vhost-user.c.
| #define DBG_VQ | ( | args... | ) |
Definition at line 64 of file vhost-user.c.
| #define foreach_protocol_feature |
| #define foreach_vhost_user_input_func_error |
Definition at line 133 of file vhost-user.c.
| #define foreach_vhost_user_tx_func_error |
Definition at line 110 of file vhost-user.c.
| #define foreach_virtio_trace_flags |
Definition at line 95 of file vhost-user.c.
| #define UNIX_GET_FD | ( | unixfd_idx | ) |
Definition at line 90 of file vhost-user.c.
| #define VHOST_DEBUG_VQ 0 |
Definition at line 53 of file vhost-user.c.
| #define VHOST_LOG_PAGE 0x1000 |
Definition at line 721 of file vhost-user.c.
| #define VHOST_USER_DEBUG_SOCKET 0 |
Definition at line 52 of file vhost-user.c.
| #define VHOST_USER_DOWN_DISCARD_COUNT 256 |
Definition at line 72 of file vhost-user.c.
| #define vhost_user_log_dirty_ring | ( | vui, | |
| vq, | |||
| member | |||
| ) |
Definition at line 756 of file vhost-user.c.
| #define VHOST_USER_RX_BUFFER_STARVATION 32 |
Definition at line 78 of file vhost-user.c.
| #define VHOST_USER_RX_COPY_THRESHOLD 64 |
Definition at line 88 of file vhost-user.c.
| Enumerator | |
|---|---|
| VHOST_USER_INPUT_FUNC_N_ERROR | |
Definition at line 141 of file vhost-user.c.
| Enumerator | |
|---|---|
| VHOST_USER_TX_FUNC_N_ERROR | |
Definition at line 119 of file vhost-user.c.
| enum virtio_trace_flag_t |
| Enumerator | |
|---|---|
| foreach_virtio_trace_flags | |
Definition at line 101 of file vhost-user.c.
Definition at line 1378 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 166 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 3112 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| static_always_inline void* map_guest_mem | ( | vhost_user_intf_t * | vui, |
| uword | addr, | ||
| u32 * | hint | ||
| ) |
|
inlinestatic |
| clib_error_t* show_vhost_user_command_fn | ( | vlib_main_t * | vm, |
| unformat_input_t * | input, | ||
| vlib_cli_command_t * | cmd | ||
| ) |
|
static |
Definition at line 2927 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 294 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 579 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| clib_error_t* vhost_user_connect_command_fn | ( | vlib_main_t * | vm, |
| unformat_input_t * | input, | ||
| vlib_cli_command_t * | cmd | ||
| ) |
|
static |
Create ethernet interface for vhost user interface.
Definition at line 2635 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int vhost_user_create_if | ( | vnet_main_t * | vnm, |
| vlib_main_t * | vm, | ||
| const char * | sock_filename, | ||
| u8 | is_server, | ||
| u32 * | sw_if_index, | ||
| u64 | feature_mask, | ||
| u8 | renumber, | ||
| u32 | custom_dev_instance, | ||
| u8 * | hwaddr, | ||
| u8 | operation_mode | ||
| ) |
Definition at line 2816 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| clib_error_t* vhost_user_delete_command_fn | ( | vlib_main_t * | vm, |
| unformat_input_t * | input, | ||
| vlib_cli_command_t * | cmd | ||
| ) |
| int vhost_user_delete_if | ( | vnet_main_t * | vnm, |
| vlib_main_t * | vm, | ||
| u32 | sw_if_index | ||
| ) |
Definition at line 2558 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int vhost_user_dump_ifs | ( | vnet_main_t * | vnm, |
| vlib_main_t * | vm, | ||
| vhost_user_intf_details_t ** | out_vuids | ||
| ) |
Definition at line 3060 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1369 of file vhost-user.c.
|
inlinestatic |
Definition at line 699 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1581 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Open server unix socket on specified sock_filename.
Definition at line 2595 of file vhost-user.c.
Here is the caller graph for this function:
|
static |
| static_always_inline u32 vhost_user_input_copy | ( | vhost_user_intf_t * | vui, |
| vhost_copy_t * | cpy, | ||
| u16 | copy_len, | ||
| u32 * | map_hint | ||
| ) |
Definition at line 1476 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1563 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| int vhost_user_intf_ready | ( | vhost_user_intf_t * | vui | ) |
Returns whether at least one TX and one RX vring are enabled.
Definition at line 501 of file vhost-user.c.
Here is the caller graph for this function:
|
static |
Definition at line 596 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline void vhost_user_log_dirty_pages | ( | vhost_user_intf_t * | vui, |
| u64 | addr, | ||
| u64 | len | ||
| ) |
| static_always_inline void vhost_user_log_dirty_pages_2 | ( | vhost_user_intf_t * | vui, |
| u64 | addr, | ||
| u64 | len, | ||
| u8 | is_host_address | ||
| ) |
Definition at line 723 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int vhost_user_modify_if | ( | vnet_main_t * | vnm, |
| vlib_main_t * | vm, | ||
| const char * | sock_filename, | ||
| u8 | is_server, | ||
| u32 | sw_if_index, | ||
| u64 | feature_mask, | ||
| u8 | renumber, | ||
| u32 | custom_dev_instance, | ||
| u8 | operation_mode | ||
| ) |
Definition at line 2875 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| u32 vhost_user_rx_discard_packet | ( | vlib_main_t * | vm, |
| vhost_user_intf_t * | vui, | ||
| vhost_user_vring_t * | txvq, | ||
| u32 | discard_max | ||
| ) |
Try to discard packets from the tx ring (VPP RX path).
Returns the number of discarded packets.
Definition at line 1524 of file vhost-user.c.
Here is the caller graph for this function:
|
static |
Definition at line 365 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void vhost_user_rx_trace | ( | vhost_trace_t * | t, |
| vhost_user_intf_t * | vui, | ||
| u16 | qid, | ||
| vlib_buffer_t * | b, | ||
| vhost_user_vring_t * | txvq | ||
| ) |
Definition at line 1416 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1463 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 531 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1280 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 763 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1296 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Disables and reset interface structure.
It can then be either init again, or removed from used interfaces.
Definition at line 2532 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 459 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2086 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline u32 vhost_user_tx_copy | ( | vhost_user_intf_t * | vui, |
| vhost_copy_t * | cpy, | ||
| u16 | copy_len, | ||
| u32 * | map_hint | ||
| ) |
Definition at line 2038 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 330 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void vhost_user_tx_trace | ( | vhost_trace_t * | t, |
| vhost_user_intf_t * | vui, | ||
| u16 | qid, | ||
| vlib_buffer_t * | b, | ||
| vhost_user_vring_t * | rxvq | ||
| ) |
Definition at line 2002 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void vhost_user_unmap_all | ( | void | ) |
|
static |
Definition at line 513 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 673 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
Spin until the vring is successfully locked.
Definition at line 635 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Try once to lock the vring.
Definition at line 626 of file vhost-user.c.
Here is the caller graph for this function:
|
inlinestatic |
Unlock the vring lock.
Definition at line 645 of file vhost-user.c.
Here is the caller graph for this function:
|
static |
Definition at line 2673 of file vhost-user.c.
Here is the call graph for this function:
Here is the caller graph for this function:| VLIB_DEVICE_TX_FUNCTION_MULTIARCH | ( | vhost_user_dev_class | , |
| vhost_user_tx | |||
| ) |
| VNET_DEVICE_CLASS | ( | vhost_user_dev_class | , |
| static | |||
| ) |
Here is the caller graph for this function:| VNET_HW_INTERFACE_CLASS | ( | vhost_interface_class | , |
| static | |||
| ) |
|
static |
(constructor) VLIB_CLI_COMMAND (show_vhost_user_command)
Definition at line 3562 of file vhost-user.c.
|
static |
(constructor) VLIB_CLI_COMMAND (vhost_user_connect_command)
Definition at line 3400 of file vhost-user.c.
|
static |
(constructor) VLIB_CLI_COMMAND (vhost_user_delete_command)
Definition at line 3422 of file vhost-user.c.
|
static |
Definition at line 149 of file vhost-user.c.
| vlib_node_registration_t vhost_user_input_node |
(constructor) VLIB_REGISTER_NODE (vhost_user_input_node)
Definition at line 108 of file vhost-user.c.
|
static |
Definition at line 156 of file vhost-user.c.
|
static |
(constructor) VLIB_REGISTER_NODE (vhost_user_process_node)
Definition at line 2520 of file vhost-user.c.
|
static |
(constructor) VLIB_REGISTER_NODE (vhost_user_send_interrupt_node)
Definition at line 2808 of file vhost-user.c.
|
static |
(constructor) VLIB_CLI_COMMAND (vhost_user_thread_command)
Definition at line 3663 of file vhost-user.c.
|
static |
Definition at line 127 of file vhost-user.c.