* [dpdk-dev] [PATCH] vhost: print the reason on numa node obtaining failure [not found] <CGME20170706133049eucas1p1b87254e1832504913cf49001ed462114@eucas1p1.samsung.com> @ 2017-07-06 13:30 ` Ilya Maximets 2017-07-07 0:19 ` Yuanhan Liu 0 siblings, 1 reply; 2+ messages in thread From: Ilya Maximets @ 2017-07-06 13:30 UTC (permalink / raw) To: dev, Yuanhan Liu; +Cc: Heetae Ahn, Ilya Maximets 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 <i.maximets@samsung.com> --- 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 19c5a43..fa29d45 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -40,6 +40,7 @@ #include <numaif.h> #endif +#include <rte_errno.h> #include <rte_ethdev.h> #include <rte_log.h> #include <rte_string_fns.h> @@ -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.7.4 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: print the reason on numa node obtaining failure 2017-07-06 13:30 ` [dpdk-dev] [PATCH] vhost: print the reason on numa node obtaining failure Ilya Maximets @ 2017-07-07 0:19 ` Yuanhan Liu 0 siblings, 0 replies; 2+ messages in thread From: Yuanhan Liu @ 2017-07-07 0:19 UTC (permalink / raw) To: Ilya Maximets; +Cc: dev, Heetae Ahn On Thu, Jul 06, 2017 at 04:30:43PM +0300, Ilya Maximets wrote: > 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 <i.maximets@samsung.com> Applied to dpdk-next-virtio. Thanks. --yliu ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-07 0:19 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20170706133049eucas1p1b87254e1832504913cf49001ed462114@eucas1p1.samsung.com> 2017-07-06 13:30 ` [dpdk-dev] [PATCH] vhost: print the reason on numa node obtaining failure Ilya Maximets 2017-07-07 0:19 ` Yuanhan Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).