diff options
author | Dave Barach <dave@barachs.net> | 2016-09-12 16:44:08 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2016-09-13 01:35:46 +0000 |
commit | 01e3caa0955c644a5e4728d6eaa44f6d2f152f61 (patch) | |
tree | 81e276445736a42c7446fb548c067d7bf84cbf22 | |
parent | 4802501f4d26ccc82344de483b033bc6ac96cc8a (diff) |
Use the correct thread stack alignment constraint, VPP-401
Change-Id: Ia7837dfaa9ed200145aeea19177fe549ab4bd087
Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r-- | vlib/vlib/unix/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vlib/vlib/unix/main.c b/vlib/vlib/unix/main.c index efa4f20f03f..3087c283d9e 100644 --- a/vlib/vlib/unix/main.c +++ b/vlib/vlib/unix/main.c @@ -465,10 +465,14 @@ vlib_unix_main (int argc, char *argv[]) } unformat_free (&input); - /* allocate N x 1mb stacks, aligned e.g. to a 16mb boundary */ + /* + * allocate n x VLIB_THREAD_STACK_SIZE stacks, aligned to a + * VLIB_THREAD_STACK_SIZE boundary + * See also: os_get_cpu_number() in vlib/vlib/threads.c + */ thread_stacks = clib_mem_alloc_aligned ((uword) tm->n_thread_stacks * VLIB_THREAD_STACK_SIZE, - (VLIB_MAX_CPUS << VLIB_LOG2_THREAD_STACK_SIZE)); + VLIB_THREAD_STACK_SIZE); vec_validate (vlib_thread_stacks, tm->n_thread_stacks - 1); for (i = 0; i < vec_len (vlib_thread_stacks); i++) |