diff options
author | Dave Barach <dave@barachs.net> | 2016-08-03 14:34:38 -0400 |
---|---|---|
committer | Keith Burns <alagalah@gmail.com> | 2016-08-15 13:57:25 +0000 |
commit | b3d93dacfde8ab21bbce171fff2971b2ed7bce6a (patch) | |
tree | 8d3b44e8a8fcbf155979114a929590fc9473b914 /vpp | |
parent | c53191deb39231cf8408cf9eb0adf5c878ddda68 (diff) |
VPP-236 Support 64-bit vector lengths, shared memory segments >4 GB
Change-Id: I02aee33e96e7ae32094b9f82f6a667d30bb52f59
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vpp')
-rw-r--r-- | vpp/vpp-api/api.c | 29 | ||||
-rw-r--r-- | vpp/vpp-api/gmon.c | 4 |
2 files changed, 29 insertions, 4 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 8a341597a0a..ee3ced4379d 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -8111,7 +8111,8 @@ VLIB_INIT_FUNCTION (vpe_api_init); static clib_error_t * api_segment_config (vlib_main_t * vm, unformat_input_t * input) { - u8 *chroot_path; + u8 * chroot_path; + u64 baseva, size, pvt_heap_size; int uid, gid, rv; const int max_buf_size = 4096; char *s, *buf; @@ -8129,7 +8130,31 @@ api_segment_config (vlib_main_t * vm, unformat_input_t * input) else if (unformat (input, "uid %d", &uid)) vl_set_memory_uid (uid); else if (unformat (input, "gid %d", &gid)) - vl_set_memory_gid (gid); + vl_set_memory_gid (gid); + else if (unformat (input, "baseva %llx", &baseva)) + vl_set_global_memory_baseva (baseva); + else if (unformat (input, "global-size %lldM", &size)) + vl_set_global_memory_size (size * (1ULL<<20)); + else if (unformat (input, "global-size %lldG", &size)) + vl_set_global_memory_size (size * (1ULL<<30)); + else if (unformat (input, "global-size %lld", &size)) + vl_set_global_memory_size (size); + else if (unformat (input, "global-pvt-heap-size %lldM", &pvt_heap_size)) + vl_set_global_pvt_heap_size (pvt_heap_size * (1ULL<<20)); + else if (unformat (input, "global-pvt-heap-size size %lld", + &pvt_heap_size)) + vl_set_global_pvt_heap_size (pvt_heap_size); + else if (unformat (input, "api-pvt-heap-size %lldM", &pvt_heap_size)) + vl_set_api_pvt_heap_size (pvt_heap_size * (1ULL<<20)); + else if (unformat (input, "api-pvt-heap-size size %lld", + &pvt_heap_size)) + vl_set_api_pvt_heap_size (pvt_heap_size); + else if (unformat (input, "api-size %lldM", &size)) + vl_set_api_memory_size (size * (1ULL<<20)); + else if (unformat (input, "api-size %lldG", &size)) + vl_set_api_memory_size (size * (1ULL<<30)); + else if (unformat (input, "api-size %lld", &size)) + vl_set_api_memory_size (size); else if (unformat (input, "uid %s", &s)) { /* lookup the username */ diff --git a/vpp/vpp-api/gmon.c b/vpp/vpp-api/gmon.c index ea4a25efc5b..330dc9fe5d3 100644 --- a/vpp/vpp-api/gmon.c +++ b/vpp/vpp-api/gmon.c @@ -180,8 +180,8 @@ gmon_init (vlib_main_t * vm) if ((error = vlib_call_init_function (vm, vpe_api_init))) return (error); - /* Make sure that /global-vm is owned as directed */ - svm_region_init_chroot_uid_gid (am->root_path, am->api_uid, am->api_gid); + if ((error = vlib_call_init_function(vm, vlibmemory_init))) + return(error); gm->vlib_main = vm; |