aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-09-11 22:13:46 +0200
committerDamjan Marion <damarion@cisco.com>2020-09-14 14:04:06 +0200
commitb509504e6b6eb8590d2d7dad2447c1bd933ce94c (patch)
treef8f307985be5ea96d4bd908638903919358eb370 /src/vppinfra/linux
parent999395cd6644a297c01dd6de033cf1ffb4e9951b (diff)
vppinfra: add clib_log2_page_sz and format/unformat functions
Type: improvement Change-Id: Ie44dbf9396cfed19dba153810b7bd76ce5377cd4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/linux')
-rw-r--r--src/vppinfra/linux/mem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 5826a6a7e49..c5811816c1f 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -103,7 +103,8 @@ clib_mem_get_fd_log2_page_size (int fd)
}
void
-clib_mem_vm_randomize_va (uword * requested_va, u32 log2_page_size)
+clib_mem_vm_randomize_va (uword * requested_va,
+ clib_mem_page_sz_t log2_page_size)
{
u8 bit_mask = 15;
@@ -345,7 +346,7 @@ clib_mem_vm_ext_free (clib_mem_vm_alloc_t * a)
}
uword
-clib_mem_vm_reserve (uword start, uword size, u32 log2_page_sz)
+clib_mem_vm_reserve (uword start, uword size, clib_mem_page_sz_t log2_page_sz)
{
uword off, pagesize = 1ULL << log2_page_sz;
int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS;