From: Ilya Maximets Date: Fri, 10 Aug 2018 07:24:54 +0000 (+0300) Subject: vhost: suppress error if NUMA is not available X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d02f2092a31457b6477e7e995f9b0ca122d951bc;p=dpdk.git 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 Reviewed-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 3c9be10a0f..91026b3e13 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -8,6 +8,7 @@ #include #include #ifdef RTE_LIBRTE_VHOST_NUMA +#include #include #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,