FD.io VPP  v17.07-30-g839fa73
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_DIR   "/run/vpp"
 
#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)   unix_file_del(&unix_main, a)
 
#define memif_file_del_by_index(a)   unix_file_del_by_index(&unix_main, a)
 
#define foreach_memif_if_flag
 
#define F_LINUX_SPECIFIC_BASE   1024
 
#define MFD_ALLOW_SEALING   0x0002U
 
#define F_ADD_SEALS   (F_LINUX_SPECIFIC_BASE + 9)
 
#define F_GET_SEALS   (F_LINUX_SPECIFIC_BASE + 10)
 
#define F_SEAL_SEAL   0x0001 /* prevent further seals from being set */
 
#define F_SEAL_SHRINK   0x0002 /* prevent file from shrinking */
 
#define F_SEAL_GROW   0x0004 /* prevent file from growing */
 
#define F_SEAL_WRITE   0x0008 /* prevent writes */
 

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 int memfd_create (const char *name, unsigned int flags)
 
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)
 
clib_error_tmemif_conn_fd_accept_ready (unix_file_t *uf)
 
clib_error_tmemif_master_conn_fd_read_ready (unix_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_read_ready (unix_file_t *uf)
 
clib_error_tmemif_master_conn_fd_write_ready (unix_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_write_ready (unix_file_t *uf)
 
clib_error_tmemif_master_conn_fd_error (unix_file_t *uf)
 
clib_error_tmemif_slave_conn_fd_error (unix_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 38 of file private.h.

#define DBG_UNIX_LOG (   ...)

Definition at line 39 of file private.h.

#define F_ADD_SEALS   (F_LINUX_SPECIFIC_BASE + 9)

Definition at line 261 of file private.h.

#define F_GET_SEALS   (F_LINUX_SPECIFIC_BASE + 10)

Definition at line 262 of file private.h.

#define F_LINUX_SPECIFIC_BASE   1024

Definition at line 258 of file private.h.

#define F_SEAL_GROW   0x0004 /* prevent file from growing */

Definition at line 266 of file private.h.

#define F_SEAL_SEAL   0x0001 /* prevent further seals from being set */

Definition at line 264 of file private.h.

#define F_SEAL_SHRINK   0x0002 /* prevent file from shrinking */

Definition at line 265 of file private.h.

#define F_SEAL_WRITE   0x0008 /* prevent writes */

Definition at line 267 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 114 of file private.h.

#define MEMIF_DEBUG   0

Definition at line 32 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_DIR   "/run/vpp"

Definition at line 20 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 { \
ASSERT (*a == ~0); \
} while (0)
a
Definition: bitmap.h:516
unix_main_t unix_main
Definition: main.c:60
static uword unix_file_add(unix_main_t *um, unix_file_t *template)
Definition: unix.h:136
#define ASSERT(truth)

Definition at line 60 of file private.h.

#define memif_file_del (   a)    unix_file_del(&unix_main, a)

Definition at line 64 of file private.h.

#define memif_file_del_by_index (   a)    unix_file_del_by_index(&unix_main, a)

Definition at line 65 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 MFD_ALLOW_SEALING   0x0002U

Definition at line 260 of file private.h.

Enumeration Type Documentation

anonymous enum
Enumerator
MEMIF_PROCESS_EVENT_START 
MEMIF_PROCESS_EVENT_STOP 

Definition at line 204 of file private.h.

Enumerator
foreach_memif_if_flag 

Definition at line 121 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:

static int memfd_create ( const char *  name,
unsigned int  flags 
)
inlinestatic

Definition at line 245 of file private.h.

+ Here is the caller graph for this function:

clib_error_t* memif_conn_fd_accept_ready ( unix_file_t uf)

Definition at line 691 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 172 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 542 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 472 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 68 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 251 of file private.h.

+ Here is the caller graph for this function:

clib_error_t* memif_init_regions_and_queues ( memif_if_t mif)

Definition at line 263 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 ( unix_file_t uf)

Definition at line 654 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 ( unix_file_t uf)

Definition at line 552 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 ( unix_file_t uf)

Definition at line 615 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 212 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 306 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 ( unix_file_t uf)

Definition at line 640 of file socket.c.

+ Here is the call graph for this function:

clib_error_t* memif_slave_conn_fd_read_ready ( unix_file_t uf)

Definition at line 590 of file socket.c.

+ Here is the call graph for this function:

clib_error_t* memif_slave_conn_fd_write_ready ( unix_file_t uf)

Definition at line 632 of file socket.c.

+ Here is the call 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 512 of file node.c.

memif_main_t memif_main

Definition at line 42 of file memif.c.

enum { ... } memif_process_event_t