aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-24 23:21:32 +0200
committerDamjan Marion <dmarion@me.com>2018-10-24 22:41:06 +0000
commit380c1676e25e8df3e5449247e3d6f8414bdae509 (patch)
tree8d9ff5e466d4b4d9df1a2ab9e2b0e8c4dfe5d131
parenta6386d4ec41ed1ba14007a2e1a006f2d1533e0e0 (diff)
dpdk: fix hugepage pre-alloc
Change-Id: I88577615bfd3cddca834a7b881979ab32bfd5574 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/dpdk/device/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index b9b3b15f2dc..9c54641cb57 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1291,7 +1291,8 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
clib_error_t *e;
uword n_pages;
vec_validate(mem_by_socket, c);
- n_pages = round_pow2 (mem_by_socket[c], default_hugepage_sz);
+ n_pages = round_pow2 ((uword) mem_by_socket[c]<<20,
+ default_hugepage_sz);
n_pages /= default_hugepage_sz;
if ((e = clib_sysfs_prealloc_hugepages(c, 0, n_pages)))