From: Igor Romanov <igor.roma...@oktetlabs.ru> The return value of rte_eth_link_get() and rte_eth_link_get_nowait() was changed from void to int. Update the usage of the functions according to the new return type.
Signed-off-by: Igor Romanov <igor.roma...@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com> --- app/proc-info/main.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 94e808dc6..a3f854b89 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -678,13 +678,18 @@ show_port(void) printf(" - generic config\n"); printf("\t -- Socket %d\n", rte_eth_dev_socket_id(i)); - rte_eth_link_get(i, &link); - printf("\t -- link speed %d duplex %d," - " auto neg %d status %d\n", - link.link_speed, - link.link_duplex, - link.link_autoneg, - link.link_status); + ret = rte_eth_link_get(i, &link); + if (ret < 0) { + printf("Link get failed (port %u): %s\n", + i, rte_strerror(-ret)); + } else { + printf("\t -- link speed %d duplex %d," + " auto neg %d status %d\n", + link.link_speed, + link.link_duplex, + link.link_autoneg, + link.link_status); + } printf("\t -- promiscuous (%d)\n", rte_eth_promiscuous_get(i)); ret = rte_eth_dev_get_mtu(i, &mtu); -- 2.17.1