18 #ifndef SRC_VLIBMEMORY_MEMORY_SHARED_H_ 19 #define SRC_VLIBMEMORY_MEMORY_SHARED_H_ 60 "Size must be exactly 8 bytes");
66 #define foreach_vl_aring_size \ 67 _(64+sizeof(ring_alloc_t), 1024) \ 68 _(256+sizeof(ring_alloc_t), 128) \ 69 _(1024+sizeof(ring_alloc_t), 64) 71 #define foreach_clnt_aring_size \ 72 _(1024+sizeof(ring_alloc_t), 1024) \ 73 _(2048+sizeof(ring_alloc_t), 128) \ 74 _(4096+sizeof(ring_alloc_t), 8) 107 #define VL_SHM_VERSION 2 108 #define VL_API_EPOCH_MASK 0xFF 109 #define VL_API_EPOCH_SHIFT 8 118 int vl_map_shmem (
const char *region_name,
int is_vlib);
135 int is_vlib,
int is_private_region);
void * vl_msg_api_alloc(int nbytes)
void vl_init_shmem(svm_region_t *vlib_rp, vl_api_shm_elem_config_t *config, int is_vlib, int is_private_region)
void vl_unmap_shmem_client(void)
void vl_unmap_shmem(void)
ring_alloc_t * client_rings
void vl_set_memory_gid(int gid)
struct ring_alloc_ ring_alloc_t
void * vl_msg_api_alloc_as_if_client(int nbytes)
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
An API client registration, only in vpp/vlib.
void vl_msg_api_free(void *a)
struct vl_api_shm_elem_config_ vl_api_shm_elem_config_t
svm_queue_t * vl_input_queue
void vl_set_api_pvt_heap_size(u64 size)
struct vl_shmem_hdr_ vl_shmem_hdr_t
void * vl_msg_api_alloc_or_null(int nbytes)
STATIC_ASSERT(sizeof(vl_api_shm_elem_config_t)==8,"Size must be exactly 8 bytes")
void vl_set_memory_uid(int uid)
void vl_msg_api_send_shmem_nolock(svm_queue_t *q, u8 *elem)
void vl_set_api_memory_size(u64 size)
void vl_register_mapped_shmem_region(svm_region_t *rp)
void vl_set_global_memory_baseva(u64 baseva)
void vl_set_global_memory_size(u64 size)
struct _svm_queue svm_queue_t
void * vl_msg_api_alloc_as_if_client_or_null(int nbytes)
void vl_set_global_pvt_heap_size(u64 size)
void vl_set_memory_root_path(const char *root_path)
int vl_map_shmem(const char *region_name, int is_vlib)
void vl_set_memory_region_name(const char *name)
int vl_mem_api_can_send(svm_queue_t *q)
void * vl_mem_api_alloc_as_if_client_w_reg(vl_api_registration_t *reg, int nbytes)