From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Maximets Subject: [PATCH v2] vhost: suppress error if NUMA is not available Date: Fri, 10 Aug 2018 10:24:54 +0300 Message-ID: <1533885894-6511-1-git-send-email-i.maximets@samsung.com> References: <1533830978-23518-1-git-send-email-i.maximets@samsung.com> Cc: Maxime Coquelin , Tiwei Bie , Zhihong Wang , Ilya Maximets To: dev@dpdk.org Return-path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id C1BE12BCD for ; Fri, 10 Aug 2018 09:24:10 +0200 (CEST) In-reply-to: <1533830978-23518-1-git-send-email-i.maximets@samsung.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- Version 2: * Fixed 'check-git-log.sh' warning. lib/librte_vhost/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #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, -- 2.7.4