|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
17 #include <sys/types.h>
18 #include <sys/mount.h>
20 #include <sys/fcntl.h>
31 #if defined(__x86_64__) && !defined(CLIB_SANITIZE_ADDR)
34 #define VLIB_PHYSMEM_DEFAULT_BASE_ADDDR (1ULL << 36)
37 #define VLIB_PHYSMEM_DEFAULT_BASE_ADDDR 0
42 u32 log2_page_sz,
u32 numa_node,
66 map->n_pages =
a->n_pages *
a->subpages_per_page;
67 map->log2_page_size =
a->log2_subpage_sz;
68 map->numa_node =
a->numa_node;
70 for (
i = 0;
i <
a->n_pages;
i++)
139 if (
unformat (line_input,
"verbose"))
141 else if (
unformat (line_input,
"v"))
143 else if (
unformat (line_input,
"detail"))
145 else if (
unformat (line_input,
"d"))
147 else if (
unformat (line_input,
"map"))
165 .path =
"show physmem",
166 .short_help =
"show physmem [verbose | detail | map]",
180 else if (
unformat (input,
"max-size %U",
format_function_t format_pmalloc_map
static uword pointer_to_uword(const void *p)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
format_function_t format_pmalloc
static uword clib_pmalloc_get_pa(clib_pmalloc_main_t *pm, void *va)
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
clib_pmalloc_main_t * pmalloc_main
#define VLIB_PHYSMEM_MAIN_F_HAVE_PAGEMAP
vlib_physmem_map_t * vlib_physmem_get_map(vlib_main_t *vm, u32 index)
static vlib_cli_command_t show_physmem_command
(constructor) VLIB_CLI_COMMAND (show_physmem_command)
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
__clib_export u8 * format_clib_error(u8 *s, va_list *va)
vlib_physmem_main_t physmem_main
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
__clib_export int clib_pmalloc_init(clib_pmalloc_main_t *pm, uword base_addr, uword size)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define VLIB_CLI_COMMAND(x,...)
#define CLIB_CACHE_LINE_BYTES
clib_error_t * vlib_physmem_shared_map_create(vlib_main_t *vm, char *name, uword size, u32 log2_page_sz, u32 numa_node, u32 *map_index)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * clib_pmalloc_last_error(clib_pmalloc_main_t *pm)
#define vec_free(V)
Free vector's memory (no header).
clib_error_t * vlib_physmem_init(vlib_main_t *vm)
#define VLIB_PHYSMEM_DEFAULT_BASE_ADDDR
clib_mem_page_sz_t def_log2_page_sz
clib_error_t * linux_vfio_init(vlib_main_t *vm)
static clib_error_t * vlib_physmem_config(vlib_main_t *vm, unformat_input_t *input)
static clib_error_t * show_physmem(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void * clib_mem_alloc_aligned(uword size, uword align)
__clib_export u64 * clib_mem_vm_get_paddr(void *mem, clib_mem_page_sz_t log2_page_size, int n_pages)
__clib_export void * clib_pmalloc_create_shared_arena(clib_pmalloc_main_t *pm, char *name, uword size, u32 log2_page_sz, u32 numa_node)
vlib_physmem_map_t * maps
static uword min_log2(uword x)
static clib_pmalloc_arena_t * clib_pmalloc_get_arena(clib_pmalloc_main_t *pm, void *va)