From 185a88359742a7002b282b3b91e63cf723e4fd42 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Thu, 6 Jul 2017 16:30:43 +0300 Subject: [PATCH] vhost: print reason of NUMA node query failure syscall always returns '-1' on failure and there is no point in printing that value. 'errno' is much more informative. Fixes: 586e39001317 ("vhost: export numa node") Signed-off-by: Ilya Maximets Acked-by: Yuanhan Liu --- lib/librte_vhost/vhost.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 653152fc7d..0b6aa1cc4f 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -40,6 +40,7 @@ #include #endif +#include #include #include #include @@ -295,7 +296,8 @@ rte_vhost_get_numa_node(int vid) MPOL_F_NODE | MPOL_F_ADDR); if (ret < 0) { RTE_LOG(ERR, VHOST_CONFIG, - "(%d) failed to query numa node: %d\n", vid, ret); + "(%d) failed to query numa node: %s\n", + vid, rte_strerror(errno)); return -1; } -- 2.20.1