summaryrefslogtreecommitdiff
path: root/lib/librte_vhost
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2018-08-10 10:24:54 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2018-08-28 15:27:39 +0200
commitd02f2092a31457b6477e7e995f9b0ca122d951bc (patch)
tree988333ab2eca199e159e7f3fe8a11e688f03a975 /lib/librte_vhost
parent1334586b669c1d27aec2bffd0b1ed9f542cd7d19 (diff)
downloaddpdk-d02f2092a31457b6477e7e995f9b0ca122d951bc.zip
dpdk-d02f2092a31457b6477e7e995f9b0ca122d951bc.tar.gz
dpdk-d02f2092a31457b6477e7e995f9b0ca122d951bc.tar.xz
vhost: suppress error if NUMA is not available
It's a common case that 'get_mempolicy' fails on systems without NUMA support. No need to flag an error in log for this situation. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'lib/librte_vhost')
-rw-r--r--lib/librte_vhost/vhost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 3c9be10..91026b3 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <stdlib.h>
#ifdef RTE_LIBRTE_VHOST_NUMA
+#include <numa.h>
#include <numaif.h>
#endif
@@ -480,7 +481,7 @@ rte_vhost_get_numa_node(int vid)
int numa_node;
int ret;
- if (dev == NULL)
+ if (dev == NULL || numa_available() != 0)
return -1;
ret = get_mempolicy(&numa_node, NULL, 0, dev,