20 #define MEMIF_DEFAULT_SOCKET_FILENAME "memif.sock" 21 #define MEMIF_DEFAULT_RING_SIZE 1024 22 #define MEMIF_DEFAULT_RX_QUEUES 1 23 #define MEMIF_DEFAULT_TX_QUEUES 1 24 #define MEMIF_DEFAULT_BUFFER_SIZE 2048 26 #define MEMIF_MAX_M2S_RING (vec_len (vlib_mains) - 1) 27 #define MEMIF_MAX_S2M_RING (vec_len (vlib_mains) - 1) 28 #define MEMIF_MAX_REGION 255 29 #define MEMIF_MAX_LOG2_RING_SIZE 14 34 #define DBG(...) clib_warning(__VA_ARGS__) 35 #define DBG_UNIX_LOG(...) clib_unix_warning(__VA_ARGS__) 38 #define DBG_UNIX_LOG(...) 42 #define memif_file_add(a, b) do { \ 44 *a = clib_file_add (&file_main, b); \ 45 clib_warning ("clib_file_add fd %d private_data %u idx %u", \ 46 (b)->file_descriptor, (b)->private_data, *a); \ 49 #define memif_file_del(a) do { \ 50 clib_warning ("clib_file_del idx %u",a - file_main.file_pool); \ 51 clib_file_del (&file_main, a); \ 54 #define memif_file_del_by_index(a) do { \ 55 clib_warning ("clib_file_del idx %u", a); \ 56 clib_file_del_by_index (&file_main, a); \ 59 #define memif_file_add(a, b) do { \ 61 *a = clib_file_add (&file_main, b); \ 63 #define memif_file_del(a) clib_file_del(&file_main, a) 64 #define memif_file_del_by_index(a) clib_file_del_by_index(&file_main, a) 113 #define foreach_memif_if_flag \ 114 _(0, ADMIN_UP, "admin-up") \ 115 _(1, IS_SLAVE, "slave") \ 116 _(2, CONNECTING, "connecting") \ 117 _(3, CONNECTED, "connected") \ 118 _(4, DELETING, "deleting") 122 #define _(a, b, c) MEMIF_IF_FLAG_##b = (1 << a),
vlib_node_registration_t memif_input_node
(constructor) VLIB_REGISTER_NODE (memif_input_node)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
u8 * format_memif_device_name(u8 *s, va_list *args)
mhash_t socket_file_index_by_filename
memif_socket_file_t * socket_files
memif_log2_ring_size_t log2_ring_size
void memif_disconnect(memif_if_t *mif, clib_error_t *err)
uint16_t memif_region_index_t
struct _vlib_node_registration vlib_node_registration_t
clib_error_t * memif_msg_send_disconnect(memif_if_t *mif, clib_error_t *err)
struct _vnet_device_class vnet_device_class_t
#define static_always_inline
clib_error_t * memif_master_conn_fd_read_ready(clib_file_t *uf)
memif_log2_ring_size_t log2_ring_size
vnet_device_class_t memif_device_class
u32 per_interface_next_index
memif_region_offset_t offset
u16 msg_id_base
API message ID base.
mhash_t dev_instance_by_id
clib_error_t * memif_master_conn_fd_error(clib_file_t *uf)
memif_region_index_t region
clib_error_t * memif_master_conn_fd_write_ready(clib_file_t *uf)
int memif_delete_if(vlib_main_t *vm, memif_if_t *mif)
uint8_t memif_log2_ring_size_t
#define foreach_memif_if_flag
uword int_clib_file_index
memif_queue_t * tx_queues
int memif_create_if(vlib_main_t *vm, memif_create_if_args_t *args)
clib_error_t * memif_connect(memif_if_t *mif)
uint32_t memif_interface_id_t
static_always_inline void * memif_get_buffer(memif_if_t *mif, memif_ring_t *ring, u16 slot)
clib_error_t * memif_slave_conn_fd_write_ready(clib_file_t *uf)
enum @336 memif_process_event_t
uword conn_clib_file_index
clib_error_t * memif_slave_conn_fd_error(clib_file_t *uf)
clib_error_t * memif_slave_conn_fd_read_ready(clib_file_t *uf)
memif_region_offset_t offset
uword * dev_instance_by_fd
uint64_t memif_region_size_t
clib_error_t * memif_init_regions_and_queues(memif_if_t *mif)
memif_log2_ring_size_t log2_ring_size
clib_error_t * memif_plugin_api_hookup(vlib_main_t *vm)
memif_queue_t * rx_queues
clib_error_t * memif_conn_fd_accept_ready(clib_file_t *uf)
uword * pending_file_indices
uint64_t memif_region_offset_t
memif_msg_fifo_elt_t * msg_queue
memif_region_index_t region
memif_region_size_t region_size