FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
mem.c File Reference
+ Include dependency graph for mem.c:

Go to the source code of this file.

Macros

#define F_LINUX_SPECIFIC_BASE   1024
 
#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 */
 

Functions

static void map_lock ()
 
static void map_unlock ()
 
static clib_mem_page_sz_t legacy_get_log2_default_hugepage_size (void)
 
void clib_mem_main_init ()
 
__clib_export u64 clib_mem_get_fd_page_size (int fd)
 
__clib_export clib_mem_page_sz_t clib_mem_get_fd_log2_page_size (int fd)
 
__clib_export void clib_mem_vm_randomize_va (uword *requested_va, clib_mem_page_sz_t log2_page_size)
 
static int legacy_memfd_create (u8 *name)
 
__clib_export int clib_mem_vm_create_fd (clib_mem_page_sz_t log2_page_size, char *fmt,...)
 
uword clib_mem_vm_reserve (uword start, uword size, clib_mem_page_sz_t log2_page_sz)
 
__clib_export clib_mem_vm_map_hdr_tclib_mem_vm_get_next_map_hdr (clib_mem_vm_map_hdr_t *hdr)
 
void * clib_mem_vm_map_internal (void *base, clib_mem_page_sz_t log2_page_sz, uword size, int fd, uword offset, char *name)
 
__clib_export int clib_mem_vm_unmap (void *base)
 
__clib_export void clib_mem_get_page_stats (void *start, clib_mem_page_sz_t log2_page_size, uword n_pages, clib_mem_page_stats_t *stats)
 
__clib_export u64clib_mem_vm_get_paddr (void *mem, clib_mem_page_sz_t log2_page_size, int n_pages)
 
__clib_export int clib_mem_set_numa_affinity (u8 numa_node, int force)
 
__clib_export int clib_mem_set_default_numa_affinity ()
 

Macro Definition Documentation

◆ F_ADD_SEALS

#define F_ADD_SEALS   (F_LINUX_SPECIFIC_BASE + 9)

Definition at line 40 of file mem.c.

◆ F_GET_SEALS

#define F_GET_SEALS   (F_LINUX_SPECIFIC_BASE + 10)

Definition at line 41 of file mem.c.

◆ F_LINUX_SPECIFIC_BASE

#define F_LINUX_SPECIFIC_BASE   1024

Definition at line 36 of file mem.c.

◆ F_SEAL_GROW

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

Definition at line 45 of file mem.c.

◆ F_SEAL_SEAL

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

Definition at line 43 of file mem.c.

◆ F_SEAL_SHRINK

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

Definition at line 44 of file mem.c.

◆ F_SEAL_WRITE

#define F_SEAL_WRITE   0x0008 /* prevent writes */

Definition at line 46 of file mem.c.

Function Documentation

◆ clib_mem_get_fd_log2_page_size()

__clib_export clib_mem_page_sz_t clib_mem_get_fd_log2_page_size ( int  fd)

Definition at line 157 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_get_fd_page_size()

__clib_export u64 clib_mem_get_fd_page_size ( int  fd)

Definition at line 148 of file mem.c.

+ Here is the caller graph for this function:

◆ clib_mem_get_page_stats()

__clib_export void clib_mem_get_page_stats ( void *  start,
clib_mem_page_sz_t  log2_page_size,
uword  n_pages,
clib_mem_page_stats_t stats 
)

Definition at line 522 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_main_init()

void clib_mem_main_init ( )

Definition at line 102 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_set_default_numa_affinity()

__clib_export int clib_mem_set_default_numa_affinity ( )

Definition at line 644 of file mem.c.

+ Here is the caller graph for this function:

◆ clib_mem_set_numa_affinity()

__clib_export int clib_mem_set_numa_affinity ( u8  numa_node,
int  force 
)

Definition at line 608 of file mem.c.

+ Here is the caller graph for this function:

◆ clib_mem_vm_create_fd()

__clib_export int clib_mem_vm_create_fd ( clib_mem_page_sz_t  log2_page_size,
char *  fmt,
  ... 
)

Definition at line 231 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_vm_get_next_map_hdr()

__clib_export clib_mem_vm_map_hdr_t* clib_mem_vm_get_next_map_hdr ( clib_mem_vm_map_hdr_t hdr)

Definition at line 355 of file mem.c.

+ Here is the caller graph for this function:

◆ clib_mem_vm_get_paddr()

__clib_export u64* clib_mem_vm_get_paddr ( void *  mem,
clib_mem_page_sz_t  log2_page_size,
int  n_pages 
)

Definition at line 566 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_vm_map_internal()

void* clib_mem_vm_map_internal ( void *  base,
clib_mem_page_sz_t  log2_page_sz,
uword  size,
int  fd,
uword  offset,
char *  name 
)

Definition at line 375 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_vm_randomize_va()

__clib_export void clib_mem_vm_randomize_va ( uword requested_va,
clib_mem_page_sz_t  log2_page_size 
)

Definition at line 164 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_vm_reserve()

uword clib_mem_vm_reserve ( uword  start,
uword  size,
clib_mem_page_sz_t  log2_page_sz 
)

Definition at line 299 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_mem_vm_unmap()

__clib_export int clib_mem_vm_unmap ( void *  base)

Definition at line 478 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ legacy_get_log2_default_hugepage_size()

static clib_mem_page_sz_t legacy_get_log2_default_hugepage_size ( void  )
static

Definition at line 79 of file mem.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ legacy_memfd_create()

static int legacy_memfd_create ( u8 name)
static

Definition at line 181 of file mem.c.

◆ map_lock()

static void map_lock ( )
static

Definition at line 66 of file mem.c.

+ Here is the caller graph for this function:

◆ map_unlock()

static void map_unlock ( )
static

Definition at line 73 of file mem.c.

+ Here is the caller graph for this function: