summaryrefslogtreecommitdiffstats
path: root/src/vlib/unix/unix.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-07-20 18:10:35 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-07 16:09:21 +0000
commit49d66f1f42cbc310e4fa0dc526b9fdb91d0ca220 (patch)
treed6ebe20d0d6791650cd28b6b800d1dee2950f439 /src/vlib/unix/unix.h
parentd630713d733718701f38176f98d563fd32679d06 (diff)
vlib physmem rework
This patch adds supprot support for multiple numa-aware physmem regions. Change-Id: I5c69a6f4da33c8ee21bdb8604d52fd2886f2327e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/unix/unix.h')
-rw-r--r--src/vlib/unix/unix.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/vlib/unix/unix.h b/src/vlib/unix/unix.h
index 97f589447b8..b5a33427d36 100644
--- a/src/vlib/unix/unix.h
+++ b/src/vlib/unix/unix.h
@@ -195,18 +195,7 @@ unix_save_error (unix_main_t * um, clib_error_t * error)
/* Main function for Unix VLIB. */
int vlib_unix_main (int argc, char *argv[]);
-/* Call to allocate/initialize physical DMA memory subsystem.
- This is not an init function so that users can explicitly enable/disable
- physmem when its not needed. */
-clib_error_t *unix_physmem_init (vlib_main_t * vm,
- int fail_if_physical_memory_not_present);
-
-static inline int
-unix_physmem_is_fake (vlib_main_t * vm)
-{
- vlib_physmem_main_t *vpm = &vm->physmem_main;
- return vpm->is_fake;
-}
+clib_error_t *unix_physmem_init (vlib_main_t * vm);
/* Set prompt for CLI. */
void vlib_unix_cli_set_prompt (char *prompt);
@@ -234,7 +223,16 @@ clib_error_t *vlib_sysfs_read (char *file_name, char *fmt, ...);
u8 *vlib_sysfs_link_to_name (char *link);
-int vlib_sysfs_get_free_hugepages (unsigned int numa_node, int page_size);
+clib_error_t *vlib_sysfs_set_nr_hugepages (unsigned int numa_node,
+ int page_size, int nr);
+clib_error_t *vlib_sysfs_get_nr_hugepages (unsigned int numa_node,
+ int page_size, int *v);
+clib_error_t *vlib_sysfs_get_free_hugepages (unsigned int numa_node,
+ int page_size, int *v);
+clib_error_t *vlib_sysfs_get_surplus_hugepages (unsigned int numa_node,
+ int page_size, int *v);
+clib_error_t *vlib_sysfs_prealloc_hugepages (unsigned int numa_node,
+ int page_size, int nr);
clib_error_t *foreach_directory_file (char *dir_name,
clib_error_t * (*f) (void *arg,