From 2e172eab36d8b3d53e5c88e29ca81d7d7ecd9620 Mon Sep 17 00:00:00 2001 From: Damjan Marion <damjan.marion@gmail.com> Date: Wed, 3 Jan 2018 15:48:34 +0000 Subject: physmem: fix physmem allocation on kernels without NUMA support Change-Id: I056598a1818a39c2da73e252600c14585e5aae83 Signed-off-by: Damjan Marion <damarion@cisco.com> --- src/vlib/linux/physmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vlib/linux') 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)", -- cgit