FD.io VPP  v16.09
Vector Packet Processing
svm.h File Reference
+ Include dependency graph for svm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  svm_region_
 
struct  svm_map_region_args_
 
struct  svm_subregion_t
 
struct  svm_main_region_t
 

Macros

#define MMAP_PAGESIZE   (clib_mem_get_page_size())
 
#define SVM_VERSION   ((1<<16) | 1) /* set to declare region ready. */
 
#define SVM_FLAGS_MHEAP   (1<<0) /* region contains an mheap */
 
#define SVM_FLAGS_FILE   (1<<1) /* region backed by one or more files */
 
#define SVM_FLAGS_NODATA   (1<<2) /* region will be further subdivided */
 
#define SVM_FLAGS_NEED_DATA_INIT   (1<<3)
 
#define SVM_PVT_MHEAP_SIZE   (128<<10) /* region's private mheap (128k) */
 
#define SVM_GLOBAL_REGION_BASEVA   0x30000000
 
#define SVM_GLOBAL_REGION_SIZE   (64<<20)
 
#define SVM_GLOBAL_REGION_NAME   "/global_vm"
 
#define SVM_OVERLAY_REGION_BASEVA   (SVM_GLOBAL_REGION_BASEVA + SVM_GLOBAL_REGION_SIZE)
 
#define SVM_OVERLAY_REGION_SIZE   (1<<20)
 
#define SVM_OVERLAY_REGION_BASENAME   "/overlay_vm"
 

Typedefs

typedef struct svm_region_ svm_region_t
 
typedef struct svm_map_region_args_ svm_map_region_args_t
 

Functions

void * svm_region_find_or_create (svm_map_region_args_t *a)
 
void svm_region_init (void)
 
void svm_region_init_chroot (char *root_path)
 
void svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid)
 
void svm_region_init_args (svm_map_region_args_t *a)
 
void svm_region_exit (void)
 
void svm_region_unmap (void *rp_arg)
 
void svm_client_scan (char *root_path)
 
void svm_client_scan_this_region_nolock (svm_region_t *rp)
 
u8shm_name_from_svm_map_region_args (svm_map_region_args_t *a)
 
static void * svm_mem_alloc (svm_region_t *rp, uword size)
 
static void * svm_mem_alloc_aligned_at_offset (svm_region_t *rp, uword size, uword align, uword offset)
 
static void svm_mem_free (svm_region_t *rp, void *ptr)
 
static void * svm_push_pvt_heap (svm_region_t *rp)
 
static void * svm_push_data_heap (svm_region_t *rp)
 
static void svm_pop_heap (void *oldheap)
 
u8format_svm_region (u8 *s, va_list *args)
 
svm_region_tsvm_get_root_rp (void)
 

Macro Definition Documentation

#define MMAP_PAGESIZE   (clib_mem_get_page_size())

Definition at line 28 of file svm.h.

#define SVM_FLAGS_FILE   (1<<1) /* region backed by one or more files */

Definition at line 33 of file svm.h.

#define SVM_FLAGS_MHEAP   (1<<0) /* region contains an mheap */

Definition at line 32 of file svm.h.

#define SVM_FLAGS_NEED_DATA_INIT   (1<<3)

Definition at line 35 of file svm.h.

#define SVM_FLAGS_NODATA   (1<<2) /* region will be further subdivided */

Definition at line 34 of file svm.h.

#define SVM_GLOBAL_REGION_BASEVA   0x30000000

Definition at line 91 of file svm.h.

#define SVM_GLOBAL_REGION_NAME   "/global_vm"

Definition at line 93 of file svm.h.

#define SVM_GLOBAL_REGION_SIZE   (64<<20)

Definition at line 92 of file svm.h.

#define SVM_OVERLAY_REGION_BASENAME   "/overlay_vm"

Definition at line 101 of file svm.h.

#define SVM_OVERLAY_REGION_BASEVA   (SVM_GLOBAL_REGION_BASEVA + SVM_GLOBAL_REGION_SIZE)

Definition at line 98 of file svm.h.

#define SVM_OVERLAY_REGION_SIZE   (1<<20)

Definition at line 100 of file svm.h.

#define SVM_PVT_MHEAP_SIZE   (128<<10) /* region's private mheap (128k) */

Definition at line 37 of file svm.h.

#define SVM_VERSION   ((1<<16) | 1) /* set to declare region ready. */

Definition at line 30 of file svm.h.

Typedef Documentation

typedef struct svm_region_ svm_region_t

Function Documentation

u8* format_svm_region ( u8 s,
va_list *  args 
)

Definition at line 143 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* shm_name_from_svm_map_region_args ( svm_map_region_args_t a)

Definition at line 388 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_client_scan ( char *  root_path)

Definition at line 1154 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_client_scan_this_region_nolock ( svm_region_t rp)

Definition at line 1126 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

svm_region_t* svm_get_root_rp ( void  )

Definition at line 54 of file svm.c.

+ Here is the caller graph for this function:

static void* svm_mem_alloc ( svm_region_t rp,
uword  size 
)
inlinestatic

Definition at line 128 of file svm.h.

+ Here is the call graph for this function:

static void* svm_mem_alloc_aligned_at_offset ( svm_region_t rp,
uword  size,
uword  align,
uword  offset 
)
inlinestatic

Definition at line 143 of file svm.h.

+ Here is the call graph for this function:

static void svm_mem_free ( svm_region_t rp,
void *  ptr 
)
inlinestatic

Definition at line 159 of file svm.h.

+ Here is the call graph for this function:

static void svm_pop_heap ( void *  oldheap)
inlinestatic

Definition at line 189 of file svm.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* svm_push_data_heap ( svm_region_t rp)
inlinestatic

Definition at line 181 of file svm.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* svm_push_pvt_heap ( svm_region_t rp)
inlinestatic

Definition at line 173 of file svm.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_region_exit ( void  )

Definition at line 1078 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* svm_region_find_or_create ( svm_map_region_args_t a)

Definition at line 839 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_region_init ( void  )

Definition at line 782 of file svm.c.

+ Here is the call graph for this function:

void svm_region_init_args ( svm_map_region_args_t a)

Definition at line 833 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_region_init_chroot ( char *  root_path)

Definition at line 799 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_region_init_chroot_uid_gid ( char *  root_path,
int  uid,
int  gid 
)

Definition at line 816 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void svm_region_unmap ( void *  rp_arg)

Definition at line 958 of file svm.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: