From: Ivan Ilchenko <ivan.ilche...@oktetlabs.ru> rte_eth_dev_info_get() return value was changed from void to int, so this patch modify rte_eth_dev_info_get() usage across app/procinfo according to its new return type.
Signed-off-by: Ivan Ilchenko <ivan.ilche...@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com> --- app/proc-info/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index a89b51b..34eb7a7 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -683,7 +683,12 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len, if (ret == 0) printf("\t -- mtu (%d)\n", mtu); - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + printf("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return; + } printf(" - queue\n"); for (j = 0; j < dev_info.nb_rx_queues; j++) { @@ -836,7 +841,13 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len, memset(&cap, 0, sizeof(cap)); memset(&error, 0, sizeof(error)); - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + printf("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return; + } + printf(" - Generic for port (%u)\n" "\t -- driver name %s\n" "\t -- max vf (%u)\n" -- 1.8.3.1