summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchenko@solarflare.com>2019-09-10 09:25:49 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:54 +0200
commit2dc3131f4c41922db69b5db13db0da2b81a94f80 (patch)
tree0cd2ca1254136c95efa37f763ab11cc484fb96fa /app
parentabfc0b9f75e28f7a6923e5c0f4ff73ba770b6587 (diff)
downloaddpdk-2dc3131f4c41922db69b5db13db0da2b81a94f80.zip
dpdk-2dc3131f4c41922db69b5db13db0da2b81a94f80.tar.gz
dpdk-2dc3131f4c41922db69b5db13db0da2b81a94f80.tar.xz
app/pipeline: check status of getting link info
The return value of rte_eth_link_get_nowait() was changed from void to int. Update the usage of the function according to the new return type. Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pipeline/init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index 871d9fa..67d54ae 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -161,10 +161,19 @@ app_ports_check_link(void)
for (i = 0; i < app.n_ports; i++) {
struct rte_eth_link link;
uint16_t port;
+ int ret;
port = app.ports[i];
memset(&link, 0, sizeof(link));
- rte_eth_link_get_nowait(port, &link);
+ ret = rte_eth_link_get_nowait(port, &link);
+ if (ret < 0) {
+ RTE_LOG(INFO, USER1,
+ "Failed to get port %u link status: %s\n",
+ port, rte_strerror(-ret));
+ all_ports_up = 0;
+ continue;
+ }
+
RTE_LOG(INFO, USER1, "Port %u (%u Gbps) %s\n",
port,
link.link_speed / 1000,