summaryrefslogtreecommitdiffstats
path: root/src/vlib/linux
diff options
context:
space:
mode:
authorDamjan Marion <damjan.marion@gmail.com>2018-01-03 15:48:34 +0000
committerDave Wallace <dwallacelf@gmail.com>2018-01-09 20:34:30 +0000
commit2e172eab36d8b3d53e5c88e29ca81d7d7ecd9620 (patch)
tree98d690e2bf5a7914bae7f52f031d083b09f4c3b2 /src/vlib/linux
parenta5fb2cf8be8298e589c2b619f7e907a0a1d76262 (diff)
physmem: fix physmem allocation on kernels without NUMA support
Change-Id: I056598a1818a39c2da73e252600c14585e5aae83 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/linux')
-rw-r--r--src/vlib/linux/physmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c
index 161dbf5c0c7..72b00e24d09 100644
--- a/src/vlib/linux/physmem.c
+++ b/src/vlib/linux/physmem.c
@@ -223,8 +223,8 @@ unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size,
{
void *ptr = pr->mem + (i << pr->log2_page_size);
int node;
- move_pages (0, 1, &ptr, 0, &node, 0);
- if (numa_node != node)
+ if ((move_pages (0, 1, &ptr, 0, &node, 0) == 0) &&
+ (numa_node != node))
{
clib_warning ("physmem page for region \'%s\' allocated on the"
" wrong numa node (requested %u actual %u)",