FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
memif.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  memif_msg_t
 
struct  memif_desc_t
 
struct  memif_ring_t
 
struct  memif_shm_t
 
struct  memif_ring_data_t
 
struct  memif_file_t
 
struct  memif_listener_t
 
struct  memif_pending_conn_t
 
struct  memif_if_t
 
struct  memif_main_t
 
struct  memif_create_if_args_t
 

Macros

#define MEMIF_VERSION_MAJOR   0
 
#define MEMIF_VERSION_MINOR   1
 
#define MEMIF_VERSION   ((MEMIF_VERSION_MAJOR << 8) | MEMIF_VERSION_MINOR)
 
#define MEMIF_MSG_TYPE_CONNECT_REQ   0
 
#define MEMIF_MSG_TYPE_CONNECT_RESP   1
 
#define MEMIF_MSG_TYPE_DISCONNECT   2
 
#define MEMIF_DEFAULT_RING_SIZE   1024
 
#define MEMIF_DEFAULT_BUFFER_SIZE   2048
 
#define MEMIF_DESC_FLAG_NEXT   (1 << 0)
 
#define MEMIF_IF_FLAG_ADMIN_UP   (1 << 0)
 
#define MEMIF_IF_FLAG_IS_SLAVE   (1 << 1)
 
#define MEMIF_IF_FLAG_CONNECTING   (1 << 2)
 
#define MEMIF_IF_FLAG_CONNECTED   (1 << 3)
 
#define MEMIF_IF_FLAG_DELETING   (1 << 4)
 
#define MEMIF_DEFAULT_SOCKET_FILENAME   "/var/vpp/memif.sock"
 
#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_PROCESS_EVENT_START = 1, MEMIF_PROCESS_EVENT_STOP = 2 }
 
enum  memif_ring_type_t { MEMIF_RING_S2M = 0, MEMIF_RING_M2S = 1 }
 

Functions

 STATIC_ASSERT_SIZEOF (memif_desc_t, 32)
 
int memif_create_if (vlib_main_t *vm, memif_create_if_args_t *args)
 
int memif_delete_if (vlib_main_t *vm, u64 key)
 
void memif_disconnect (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 memif_ring_tmemif_get_ring (memif_if_t *mif, memif_ring_type_t type, u16 ring_num)
 
static_always_inline void * memif_get_buffer (memif_if_t *mif, memif_ring_t *ring, u16 slot)
 

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 F_ADD_SEALS   (F_LINUX_SPECIFIC_BASE + 9)

Definition at line 250 of file memif.h.

#define F_GET_SEALS   (F_LINUX_SPECIFIC_BASE + 10)

Definition at line 251 of file memif.h.

#define F_LINUX_SPECIFIC_BASE   1024

Definition at line 247 of file memif.h.

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

Definition at line 255 of file memif.h.

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

Definition at line 253 of file memif.h.

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

Definition at line 254 of file memif.h.

#define F_SEAL_WRITE   0x0008 /* prevent writes */

Definition at line 256 of file memif.h.

#define MEMIF_DEFAULT_BUFFER_SIZE   2048

Definition at line 36 of file memif.h.

#define MEMIF_DEFAULT_RING_SIZE   1024

Definition at line 32 of file memif.h.

#define MEMIF_DEFAULT_SOCKET_FILENAME   "/var/vpp/memif.sock"

Definition at line 168 of file memif.h.

#define MEMIF_DESC_FLAG_NEXT   (1 << 0)

Definition at line 46 of file memif.h.

#define MEMIF_IF_FLAG_ADMIN_UP   (1 << 0)

Definition at line 103 of file memif.h.

#define MEMIF_IF_FLAG_CONNECTED   (1 << 3)

Definition at line 106 of file memif.h.

#define MEMIF_IF_FLAG_CONNECTING   (1 << 2)

Definition at line 105 of file memif.h.

#define MEMIF_IF_FLAG_DELETING   (1 << 4)

Definition at line 107 of file memif.h.

#define MEMIF_IF_FLAG_IS_SLAVE   (1 << 1)

Definition at line 104 of file memif.h.

#define MEMIF_MSG_TYPE_CONNECT_REQ   0

Definition at line 25 of file memif.h.

#define MEMIF_MSG_TYPE_CONNECT_RESP   1

Definition at line 26 of file memif.h.

#define MEMIF_MSG_TYPE_DISCONNECT   2

Definition at line 27 of file memif.h.

#define MEMIF_VERSION   ((MEMIF_VERSION_MAJOR << 8) | MEMIF_VERSION_MINOR)

Definition at line 23 of file memif.h.

#define MEMIF_VERSION_MAJOR   0

Definition at line 21 of file memif.h.

#define MEMIF_VERSION_MINOR   1

Definition at line 22 of file memif.h.

#define MFD_ALLOW_SEALING   0x0002U

Definition at line 249 of file memif.h.

Enumeration Type Documentation

anonymous enum
Enumerator
MEMIF_PROCESS_EVENT_START 
MEMIF_PROCESS_EVENT_STOP 

Definition at line 175 of file memif.h.

Enumerator
MEMIF_RING_S2M 
MEMIF_RING_M2S 

Definition at line 218 of file memif.h.

Function Documentation

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

Definition at line 213 of file memif.h.

+ 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 786 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,
u64  key 
)

Definition at line 974 of file memif.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void memif_disconnect ( vlib_main_t vm,
memif_if_t mif 
)

Definition at line 89 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 240 of file memif.h.

+ Here is the caller graph for this function:

static_always_inline memif_ring_t* memif_get_ring ( memif_if_t mif,
memif_ring_type_t  type,
u16  ring_num 
)

Definition at line 225 of file memif.h.

+ Here is the caller graph for this function:

clib_error_t* memif_plugin_api_hookup ( vlib_main_t vm)

Definition at line 293 of file memif_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_ASSERT_SIZEOF ( memif_desc_t  ,
32   
)

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 358 of file node.c.

memif_main_t memif_main

Definition at line 47 of file memif.c.

enum { ... } memif_process_event_t