nat: use correct data types for memory sizes
[vpp.git] / src / vlib / physmem_funcs.h
index 0082f85..d93bae8 100644 (file)
 #ifndef included_vlib_physmem_funcs_h
 #define included_vlib_physmem_funcs_h
 
+#include <vppinfra/clib.h>
+#include <vppinfra/clib_error.h>
+#include <vlib/physmem.h>
+#include <vlib/main.h>
+
 clib_error_t *vlib_physmem_init (vlib_main_t * vm);
 clib_error_t *vlib_physmem_shared_map_create (vlib_main_t * vm, char *name,
-                                             uword size, u32 numa_node,
-                                             u32 * map_index);
+                                             uword size, u32 log2_page_sz,
+                                             u32 numa_node, u32 * map_index);
 
 vlib_physmem_map_t *vlib_physmem_get_map (vlib_main_t * vm, u32 index);
 
@@ -54,6 +59,15 @@ vlib_physmem_alloc_aligned (vlib_main_t * vm, uword n_bytes, uword alignment)
   return clib_pmalloc_alloc_aligned (pm, n_bytes, alignment);
 }
 
+always_inline void *
+vlib_physmem_alloc_aligned_on_numa (vlib_main_t * vm, uword n_bytes,
+                                   uword alignment, u32 numa_node)
+{
+  clib_pmalloc_main_t *pm = vm->physmem_main.pmalloc_main;
+  return clib_pmalloc_alloc_aligned_on_numa (pm, n_bytes, alignment,
+                                            numa_node);
+}
+
 /* By default allocate I/O memory with cache line alignment. */
 always_inline void *
 vlib_physmem_alloc (vlib_main_t * vm, uword n_bytes)