FD.io VPP  v18.01-8-g0eacf49
Vector Packet Processing
private.h File Reference
+ Include dependency graph for private.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  memif_socket_file_t
 
struct  memif_region_t
 
struct  memif_msg_fifo_elt_t
 
struct  memif_queue_t
 
struct  memif_if_t
 
struct  memif_main_t
 
struct  memif_create_if_args_t
 

Macros

#define MEMIF_DEFAULT_SOCKET_FILENAME   "memif.sock"
 
#define MEMIF_DEFAULT_RING_SIZE   1024
 
#define MEMIF_DEFAULT_RX_QUEUES   1
 
#define MEMIF_DEFAULT_TX_QUEUES   1
 
#define MEMIF_DEFAULT_BUFFER_SIZE   2048
 
#define MEMIF_MAX_M2S_RING   (vec_len (vlib_mains) - 1)
 
#define MEMIF_MAX_S2M_RING   (vec_len (vlib_mains) - 1)
 
#define MEMIF_MAX_REGION   255
 
#define MEMIF_MAX_LOG2_RING_SIZE   14
 
#define MEMIF_DEBUG   0
 
#define DBG(...)
 
#define DBG_UNIX_LOG(...)
 
#define memif_file_add(a, b)
 
#define memif_file_del(a)   clib_file_del(&file_main, a)
 
#define memif_file_del_by_index(a)   clib_file_del_by_index(&file_main, a)
 
#define foreach_memif_if_flag
 

Enumerations

enum  memif_if_flag_t { foreach_memif_if_flag }
 
enum  { MEMIF_PROCESS_EVENT_START = 1, MEMIF_PROCESS_EVENT_STOP = 2 }
 

Functions

int memif_create_if (vlib_main_t *vm, memif_create_if_args_t *args)
 
int memif_delete_if (vlib_main_t *vm, memif_if_t *mif)
 
clib_error_tmemif_plugin_api_hookup (vlib_main_t *vm)
 
static_always_inline void * memif_get_buffer (memif_if_t *mif, memif_ring_t *ring, u16 slot)
 
clib_error_tmemif_init_regions_and_queues (memif_if_t *mif)
 
clib_error_tmemif_connect (memif_if_t *mif)
 
void memif_disconnect (memif_if_t *mif, clib_error_t *err)
 
void memif_socket_close (clib_socket_t **sock)
 
clib_error_tmemif_conn_fd_accept_ready (clib_file_t *uf)
 
clib_error_tmemif_master_conn_fd_read_ready (clib_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_read_ready (clib_file_t *uf)
 
clib_error_tmemif_master_conn_fd_write_ready (clib_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_write_ready (clib_file_t *uf)
 
clib_error_tmemif_master_conn_fd_error (clib_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_error (clib_file_t *uf)
 
clib_error_tmemif_msg_send_disconnect (memif_if_t *mif, clib_error_t *err)
 
u8format_memif_device_name (u8 *s, va_list *args)
 

Variables

memif_main_t memif_main
 
vnet_device_class_t memif_device_class
 
vlib_node_registration_t memif_input_node
 (constructor) VLIB_REGISTER_NODE (memif_input_node) More...
 
enum { ... }  memif_process_event_t
 

Macro Definition Documentation

#define DBG (   ...)

Definition at line 37 of file private.h.

#define DBG_UNIX_LOG (   ...)

Definition at line 38 of file private.h.

#define foreach_memif_if_flag
Value:
_(0, ADMIN_UP, "admin-up") \
_(1, IS_SLAVE, "slave") \
_(2, CONNECTING, "connecting") \
_(3, CONNECTED, "connected") \
_(4, DELETING, "deleting")

Definition at line 110 of file private.h.

#define MEMIF_DEBUG   0

Definition at line 31 of file private.h.

#define MEMIF_DEFAULT_BUFFER_SIZE   2048

Definition at line 24 of file private.h.

#define MEMIF_DEFAULT_RING_SIZE   1024

Definition at line 21 of file private.h.

#define MEMIF_DEFAULT_RX_QUEUES   1

Definition at line 22 of file private.h.

#define MEMIF_DEFAULT_SOCKET_FILENAME   "memif.sock"

Definition at line 20 of file private.h.

#define MEMIF_DEFAULT_TX_QUEUES   1

Definition at line 23 of file private.h.

#define memif_file_add (   a,
 
)
Value:
do { \
} while (0)
a
Definition: bitmap.h:516
clib_file_main_t file_main
Definition: main.c:63
static uword clib_file_add(clib_file_main_t *um, clib_file_t *template)
Definition: file.h:84

Definition at line 58 of file private.h.

#define memif_file_del (   a)    clib_file_del(&file_main, a)

Definition at line 61 of file private.h.

#define memif_file_del_by_index (   a)    clib_file_del_by_index(&file_main, a)

Definition at line 62 of file private.h.

#define MEMIF_MAX_LOG2_RING_SIZE   14

Definition at line 29 of file private.h.

#define MEMIF_MAX_M2S_RING   (vec_len (vlib_mains) - 1)

Definition at line 26 of file private.h.

#define MEMIF_MAX_REGION   255

Definition at line 28 of file private.h.

#define MEMIF_MAX_S2M_RING   (vec_len (vlib_mains) - 1)

Definition at line 27 of file private.h.

Enumeration Type Documentation

anonymous enum
Enumerator
MEMIF_PROCESS_EVENT_START 
MEMIF_PROCESS_EVENT_STOP 

Definition at line 196 of file private.h.

Enumerator
foreach_memif_if_flag 

Definition at line 117 of file private.h.

Function Documentation

u8* format_memif_device_name ( u8 s,
va_list *  args 
)

Definition at line 52 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_conn_fd_accept_ready ( clib_file_t uf)

Definition at line 628 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_connect ( memif_if_t mif)

Definition at line 175 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int memif_create_if ( vlib_main_t vm,
memif_create_if_args_t args 
)

Definition at line 543 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int memif_delete_if ( vlib_main_t vm,
memif_if_t mif 
)

Definition at line 466 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void memif_disconnect ( memif_if_t mif,
clib_error_t err 
)

Definition at line 69 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void* memif_get_buffer ( memif_if_t mif,
memif_ring_t ring,
u16  slot 
)

Definition at line 225 of file private.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_init_regions_and_queues ( memif_if_t mif)

Definition at line 266 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_master_conn_fd_error ( clib_file_t uf)

Definition at line 590 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_master_conn_fd_read_ready ( clib_file_t uf)

Definition at line 486 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_master_conn_fd_write_ready ( clib_file_t uf)

Definition at line 551 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_msg_send_disconnect ( memif_if_t mif,
clib_error_t err 
)

Definition at line 189 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_plugin_api_hookup ( vlib_main_t vm)

Definition at line 311 of file memif_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_slave_conn_fd_error ( clib_file_t uf)

Definition at line 576 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_slave_conn_fd_read_ready ( clib_file_t uf)

Definition at line 525 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* memif_slave_conn_fd_write_ready ( clib_file_t uf)

Definition at line 568 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void memif_socket_close ( clib_socket_t **  sock)

Definition at line 43 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vnet_device_class_t memif_device_class
vlib_node_registration_t memif_input_node

(constructor) VLIB_REGISTER_NODE (memif_input_node)

Definition at line 497 of file node.c.

memif_main_t memif_main

Definition at line 43 of file memif.c.

enum { ... } memif_process_event_t