From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 09/18] app/pipeline: check status of getting link info
Date: Tue, 10 Sep 2019 09:25:49 +0100 [thread overview]
Message-ID: <1568103959-25572-10-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1568103959-25572-1-git-send-email-arybchenko@solarflare.com>
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>
---
app/test-pipeline/init.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index 871d9fa2d..67d54ae05 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,
--
2.17.1
next prev parent reply other threads:[~2019-09-10 8:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 8:25 [dpdk-dev] [PATCH 00/18] ethdev: change link status get functions return value to int Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 01/18] net/bonding: fix link speed update in broadcast mode Andrew Rybchenko
2019-09-10 23:01 ` Chas Williams
2019-09-10 8:25 ` [dpdk-dev] [PATCH 02/18] ethdev: change link status get functions return value to int Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 03/18] app/testpmd: check status of getting link info Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 04/18] net/bonding: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 05/18] net/ixgbe: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 06/18] net/memif: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 07/18] app/proc-info: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 08/18] app/test: " Andrew Rybchenko
2019-09-10 8:25 ` Andrew Rybchenko [this message]
2019-09-10 8:25 ` [dpdk-dev] [PATCH 10/18] examples: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 11/18] examples/bbdev_app: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 12/18] examples/ip_pipeline: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 13/18] examples/ethtool: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 14/18] examples/flow_filtering: " Andrew Rybchenko
2019-09-12 5:16 ` Ori Kam
2019-09-10 8:25 ` [dpdk-dev] [PATCH 15/18] examples/link_status_interrupt: check status of getting link Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 16/18] examples/distributor: check status of getting link info Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 17/18] examples/qos_sched: " Andrew Rybchenko
2019-09-10 8:25 ` [dpdk-dev] [PATCH 18/18] examples/kni: " Andrew Rybchenko
2019-09-24 12:38 ` [dpdk-dev] [PATCH 00/18] ethdev: change link status get functions return value to int Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1568103959-25572-10-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).