FD.io VPP  v17.07-30-g839fa73
Vector Packet Processing
api_common.h File Reference
+ Include dependency graph for api_common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ring_alloc_
 
struct  vl_shmem_hdr_
 

Macros

#define foreach_vl_aring_size
 
#define foreach_clnt_aring_size
 
#define VL_SHM_VERSION   2
 
#define VL_API_EPOCH_MASK   0xFF
 
#define VL_API_EPOCH_SHIFT   8
 

Typedefs

typedef struct ring_alloc_ ring_alloc_t
 
typedef struct vl_shmem_hdr_ vl_shmem_hdr_t
 

Functions

void * vl_msg_api_alloc (int nbytes)
 
void * vl_msg_api_alloc_or_null (int nbytes)
 
void * vl_msg_api_alloc_as_if_client (int nbytes)
 
void * vl_msg_api_alloc_as_if_client_or_null (int nbytes)
 
void vl_msg_api_free (void *a)
 
int vl_map_shmem (const char *region_name, int is_vlib)
 
void vl_register_mapped_shmem_region (svm_region_t *rp)
 
void vl_unmap_shmem (void)
 
void vl_msg_api_send_shmem (unix_shared_memory_queue_t *q, u8 *elem)
 
void vl_msg_api_send_shmem_nolock (unix_shared_memory_queue_t *q, u8 *elem)
 
void vl_msg_api_send (vl_api_registration_t *rp, u8 *elem)
 
int vl_client_connect (const char *name, int ctx_quota, int input_queue_size)
 
void vl_client_disconnect (void)
 
unix_shared_memory_queue_tvl_api_client_index_to_input_queue (u32 index)
 
vl_api_registration_tvl_api_client_index_to_registration (u32 index)
 
int vl_client_api_map (const char *region_name)
 
void vl_client_api_unmap (void)
 
void vl_set_memory_region_name (const char *name)
 
void vl_set_memory_root_path (const char *root_path)
 
void vl_set_memory_uid (int uid)
 
void vl_set_memory_gid (int gid)
 
void vl_set_global_memory_baseva (u64 baseva)
 
void vl_set_global_memory_size (u64 size)
 
void vl_set_api_memory_size (u64 size)
 
void vl_set_global_pvt_heap_size (u64 size)
 
void vl_set_api_pvt_heap_size (u64 size)
 
void vl_client_disconnect_from_vlib (void)
 
int vl_client_connect_to_vlib (const char *svm_name, const char *client_name, int rx_queue_size)
 
int vl_client_connect_to_vlib_no_rx_pthread (const char *svm_name, const char *client_name, int rx_queue_size)
 
u16 vl_client_get_first_plugin_msg_id (const char *plugin_name)
 
void vl_api_rpc_call_main_thread (void *fp, u8 *data, u32 data_length)
 

Macro Definition Documentation

#define foreach_clnt_aring_size
Value:
_(1024+8, 1024) \
_(2048+8, 128) \
_(4096+8, 8)

Definition at line 55 of file api_common.h.

#define foreach_vl_aring_size
Value:
_(64+8, 1024) \
_(256+8, 128) \
_(1024+8, 64)

Definition at line 50 of file api_common.h.

#define VL_API_EPOCH_MASK   0xFF

Definition at line 91 of file api_common.h.

#define VL_API_EPOCH_SHIFT   8

Definition at line 92 of file api_common.h.

#define VL_SHM_VERSION   2

Definition at line 89 of file api_common.h.

Typedef Documentation

typedef struct ring_alloc_ ring_alloc_t
typedef struct vl_shmem_hdr_ vl_shmem_hdr_t

Function Documentation

unix_shared_memory_queue_t* vl_api_client_index_to_input_queue ( u32  index)

Definition at line 625 of file memory_shared.c.

+ Here is the call graph for this function:

vl_api_registration_t* vl_api_client_index_to_registration ( u32  index)

Definition at line 619 of file memory_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_api_rpc_call_main_thread ( void *  fp,
u8 data,
u32  data_length 
)

Definition at line 1328 of file memory_vlib.c.

+ Here is the caller graph for this function:

int vl_client_api_map ( const char *  region_name)

Definition at line 329 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_client_api_unmap ( void  )

Definition at line 351 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vl_client_connect ( const char *  name,
int  ctx_quota,
int  input_queue_size 
)

Definition at line 158 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vl_client_connect_to_vlib ( const char *  svm_name,
const char *  client_name,
int  rx_queue_size 
)

Definition at line 392 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vl_client_connect_to_vlib_no_rx_pthread ( const char *  svm_name,
const char *  client_name,
int  rx_queue_size 
)

Definition at line 400 of file memory_client.c.

+ Here is the call graph for this function:

void vl_client_disconnect ( void  )

Definition at line 265 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_client_disconnect_from_vlib ( void  )

Definition at line 409 of file memory_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 vl_client_get_first_plugin_msg_id ( const char *  plugin_name)

Definition at line 442 of file memory_client.c.

+ Here is the call graph for this function:

int vl_map_shmem ( const char *  region_name,
int  is_vlib 
)

Definition at line 333 of file memory_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* vl_msg_api_alloc ( int  nbytes)

Definition at line 180 of file memory_shared.c.

+ Here is the call graph for this function:

void* vl_msg_api_alloc_as_if_client ( int  nbytes)

Definition at line 205 of file memory_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* vl_msg_api_alloc_as_if_client_or_null ( int  nbytes)

Definition at line 211 of file memory_shared.c.

+ Here is the call graph for this function:

void* vl_msg_api_alloc_or_null ( int  nbytes)

Definition at line 194 of file memory_shared.c.

+ Here is the call graph for this function:

void vl_msg_api_free ( void *  a)

Definition at line 217 of file memory_shared.c.

+ Here is the call graph for this function:

void vl_msg_api_send ( vl_api_registration_t rp,
u8 elem 
)

Definition at line 104 of file memory_vlib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_send_shmem ( unix_shared_memory_queue_t q,
u8 elem 
)

Definition at line 553 of file memory_shared.c.

+ Here is the call graph for this function:

void vl_msg_api_send_shmem_nolock ( unix_shared_memory_queue_t q,
u8 elem 
)

Definition at line 565 of file memory_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_register_mapped_shmem_region ( svm_region_t rp)

Definition at line 519 of file memory_shared.c.

void vl_set_api_memory_size ( u64  size)

Definition at line 309 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_api_pvt_heap_size ( u64  size)

Definition at line 325 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_global_memory_baseva ( u64  baseva)

Definition at line 293 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_global_memory_size ( u64  size)

Definition at line 301 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_global_pvt_heap_size ( u64  size)

Definition at line 317 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_memory_gid ( int  gid)

Definition at line 285 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_memory_region_name ( const char *  name)

Definition at line 1206 of file memory_vlib.c.

+ Here is the caller graph for this function:

void vl_set_memory_root_path ( const char *  root_path)

Definition at line 269 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_set_memory_uid ( int  uid)

Definition at line 277 of file memory_shared.c.

+ Here is the caller graph for this function:

void vl_unmap_shmem ( void  )

Definition at line 527 of file memory_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: