FD.io VPP  v18.07-rc0-415-g6c78436
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_packet_op_t
 
struct  memif_copy_op_t
 
struct  memif_per_thread_data_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_file_add(a, b)
 
#define memif_file_del(a)
 
#define memif_file_del_by_index(a)
 
#define foreach_memif_if_flag
 
#define MEMIF_RX_VECTOR_SZ   VLIB_FRAME_SIZE
 

Enumerations

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

Functions

int memif_socket_filename_add_del (u8 is_add, u32 sock_id, u8 *sock_filename)
 
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 foreach_memif_if_flag
Value:
_(0, ADMIN_UP, "admin-up") \
_(1, IS_SLAVE, "slave") \
_(2, CONNECTING, "connecting") \
_(3, CONNECTED, "connected") \
_(4, DELETING, "deleting") \
_(5, ZERO_COPY, "zero-copy") \
_(6, ERROR, "error")

Definition at line 104 of file private.h.

#define MEMIF_DEFAULT_BUFFER_SIZE   2048

Definition at line 25 of file private.h.

#define MEMIF_DEFAULT_RING_SIZE   1024

Definition at line 22 of file private.h.

#define MEMIF_DEFAULT_RX_QUEUES   1

Definition at line 23 of file private.h.

#define MEMIF_DEFAULT_SOCKET_FILENAME   "memif.sock"

Definition at line 21 of file private.h.

#define MEMIF_DEFAULT_TX_QUEUES   1

Definition at line 24 of file private.h.

#define memif_file_add (   a,
 
)
Value:
do { \
vlib_log_warn ((&memif_main)->log_class, \
"clib_file_add fd %d private_data %u idx %u", \
(b)->file_descriptor, (b)->private_data, *a); \
} while (0)
#define vlib_log_warn(...)
Definition: log.h:51
a
Definition: bitmap.h:537
clib_file_main_t file_main
Definition: main.c:63
memif_main_t memif_main
Definition: memif.c:43
static uword clib_file_add(clib_file_main_t *um, clib_file_t *template)
Definition: file.h:96

Definition at line 33 of file private.h.

#define memif_file_del (   a)
Value:
do { \
vlib_log_warn ((&memif_main)->log_class, \
"clib_file_del idx %u",a - file_main.file_pool); \
} while (0)
static void clib_file_del(clib_file_main_t *um, clib_file_t *f)
Definition: file.h:109
#define vlib_log_warn(...)
Definition: log.h:51
a
Definition: bitmap.h:537
clib_file_t * file_pool
Definition: file.h:88
clib_file_main_t file_main
Definition: main.c:63
memif_main_t memif_main
Definition: memif.c:43

Definition at line 40 of file private.h.

#define memif_file_del_by_index (   a)
Value:
do { \
vlib_log_warn ((&memif_main)->log_class, "clib_file_del idx %u", a); \
} while (0)
#define vlib_log_warn(...)
Definition: log.h:51
a
Definition: bitmap.h:537
clib_file_main_t file_main
Definition: main.c:63
memif_main_t memif_main
Definition: memif.c:43
static void clib_file_del_by_index(clib_file_main_t *um, uword index)
Definition: file.h:119

Definition at line 46 of file private.h.

#define MEMIF_MAX_LOG2_RING_SIZE   14

Definition at line 30 of file private.h.

#define MEMIF_MAX_M2S_RING   (vec_len (vlib_mains) - 1)

Definition at line 27 of file private.h.

#define MEMIF_MAX_REGION   255

Definition at line 29 of file private.h.

#define MEMIF_MAX_S2M_RING   (vec_len (vlib_mains) - 1)

Definition at line 28 of file private.h.

#define MEMIF_RX_VECTOR_SZ   VLIB_FRAME_SIZE

Definition at line 183 of file private.h.

Enumeration Type Documentation

anonymous enum
Enumerator
MEMIF_PROCESS_EVENT_START 
MEMIF_PROCESS_EVENT_STOP 

Definition at line 224 of file private.h.

Enumerator
foreach_memif_if_flag 

Definition at line 113 of file private.h.

Function Documentation

u8* format_memif_device_name ( u8 s,
va_list *  args 
)

Definition at line 51 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 650 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 186 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 740 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 660 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 256 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 304 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 611 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 507 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 572 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 190 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 408 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 597 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 546 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 589 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:

int memif_socket_filename_add_del ( u8  is_add,
u32  sock_id,
u8 sock_filename 
)

Definition at line 621 of file memif.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 915 of file node.c.

memif_main_t memif_main

Definition at line 43 of file memif.c.

enum { ... } memif_process_event_t