FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
memfd.h File Reference
+ Include dependency graph for memfd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  memfd_shared_header_t
 
struct  memfd_private_t
 

Macros

#define MMAP_PAGESIZE   (clib_mem_get_page_size())
 
#define MEMFD_N_OPAQUE   7
 
#define foreach_memfd_api_error
 
#define MEMFD_API_ERROR_NO_NAME   (-10)
 
#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  memfd_api_error_enum_t { foreach_memfd_api_error }
 

Functions

static void memfd_lock (memfd_shared_header_t *h, u32 my_pid, u32 tag)
 
static void memfd_lock_non_recursive (memfd_shared_header_t *h, u32 tag)
 
static void memfd_unlock (memfd_shared_header_t *h)
 
static void memfd_unlock_non_recursive (memfd_shared_header_t *h)
 
static void * memfd_push_heap (memfd_shared_header_t *sh)
 
static void memfd_pop_heap (void *oldheap)
 
int memfd_master_init (memfd_private_t *memfd, u32 master_index)
 
int memfd_slave_init (memfd_private_t *memfd)
 
void memfd_delete (memfd_private_t *memfd)
 

Macro Definition Documentation

#define F_ADD_SEALS   (F_LINUX_SPECIFIC_BASE + 9)

Definition at line 178 of file memfd.h.

#define F_GET_SEALS   (F_LINUX_SPECIFIC_BASE + 10)

Definition at line 179 of file memfd.h.

#define F_LINUX_SPECIFIC_BASE   1024

Definition at line 175 of file memfd.h.

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

Definition at line 183 of file memfd.h.

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

Definition at line 181 of file memfd.h.

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

Definition at line 182 of file memfd.h.

#define F_SEAL_WRITE   0x0008 /* prevent writes */

Definition at line 184 of file memfd.h.

#define foreach_memfd_api_error
Value:
_(NO_NAME, "No shared segment name", -100) \
_(NO_SIZE, "Size not set (master)", -101) \
_(CREATE_FAILURE, "Create failed", -102) \
_(SET_SIZE, "Set size failed", -103) \
_(MMAP, "mmap failed", -104) \
_(SLAVE_TIMEOUT, "Slave map timeout", -105)

Definition at line 150 of file memfd.h.

#define MEMFD_API_ERROR_NO_NAME   (-10)

Definition at line 165 of file memfd.h.

#define MEMFD_N_OPAQUE   7

Definition at line 47 of file memfd.h.

#define MFD_ALLOW_SEALING   0x0002U

Definition at line 177 of file memfd.h.

#define MMAP_PAGESIZE   (clib_mem_get_page_size())

Definition at line 44 of file memfd.h.

Enumeration Type Documentation

Enumerator
foreach_memfd_api_error 

Definition at line 158 of file memfd.h.

Function Documentation

void memfd_delete ( memfd_private_t memfd)
static void memfd_lock ( memfd_shared_header_t h,
u32  my_pid,
u32  tag 
)
inlinestatic

Definition at line 91 of file memfd.h.

static void memfd_lock_non_recursive ( memfd_shared_header_t h,
u32  tag 
)
inlinestatic

Definition at line 108 of file memfd.h.

int memfd_master_init ( memfd_private_t memfd,
u32  master_index 
)

Definition at line 18 of file memfd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void memfd_pop_heap ( void *  oldheap)
inlinestatic

Definition at line 145 of file memfd.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* memfd_push_heap ( memfd_shared_header_t sh)
inlinestatic

Definition at line 137 of file memfd.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int memfd_slave_init ( memfd_private_t memfd)

Definition at line 96 of file memfd.c.

static void memfd_unlock ( memfd_shared_header_t h)
inlinestatic

Definition at line 117 of file memfd.h.

static void memfd_unlock_non_recursive ( memfd_shared_header_t h)
inlinestatic

Definition at line 129 of file memfd.h.