From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Nikhil Rao <nikhil.rao@intel.com>
Cc: <dev@dpdk.org>, Igor Romanov <igor.romanov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH 4/7] app/test: check status of getting MAC address
Date: Tue, 10 Sep 2019 09:52:18 +0100 [thread overview]
Message-ID: <1568105541-7399-5-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1568105541-7399-1-git-send-email-arybchenko@solarflare.com>
From: Igor Romanov <igor.romanov@oktetlabs.ru>
The return value of rte_eth_macaddr_get() was changed from void to int.
Update the usage of the functions according to the new return type.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
app/test/test_event_eth_rx_adapter.c | 4 +++-
app/test/test_event_eth_tx_adapter.c | 4 +++-
app/test/test_pmd_perf.c | 7 ++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c
index 6254fcd33..dd3bce71b 100644
--- a/app/test/test_event_eth_rx_adapter.c
+++ b/app/test/test_event_eth_rx_adapter.c
@@ -81,7 +81,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf,
/* Display the port MAC address. */
struct rte_ether_addr addr;
- rte_eth_macaddr_get(port, &addr);
+ retval = rte_eth_macaddr_get(port, &addr);
+ if (retval < 0)
+ return retval;
printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
" %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
(unsigned int)port,
diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
index 73f6afea2..3af749280 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -85,7 +85,9 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
/* Display the port MAC address. */
struct rte_ether_addr addr;
- rte_eth_macaddr_get(port, &addr);
+ retval = rte_eth_macaddr_get(port, &addr);
+ if (retval < 0)
+ return retval;
printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
" %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
(unsigned int)port,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 36b06ce5d..d61be58bb 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -724,7 +724,12 @@ test_pmd_perf(void)
"Cannot configure device: err=%d, port=%d\n",
ret, portid);
- rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE,
+ "Cannot get mac address: err=%d, port=%d\n",
+ ret, portid);
+
printf("Port %u ", portid);
print_ethaddr("Address:", &ports_eth_addr[portid]);
printf("\n");
--
2.17.1
next prev parent reply other threads:[~2019-09-10 8:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 8:52 [dpdk-dev] [PATCH 0/7] ethdev: change MAC addr get function return value to int Andrew Rybchenko
2019-09-10 8:52 ` [dpdk-dev] [PATCH 1/7] " Andrew Rybchenko
2019-09-10 8:52 ` [dpdk-dev] [PATCH 2/7] app/testpmd: check status of getting MAC address Andrew Rybchenko
2019-09-10 8:52 ` [dpdk-dev] [PATCH 3/7] app/pdump: " Andrew Rybchenko
2019-09-10 8:52 ` Andrew Rybchenko [this message]
2019-09-10 8:52 ` [dpdk-dev] [PATCH 5/7] app/test: check status of getting MAC address in bonding Andrew Rybchenko
2019-09-10 8:52 ` [dpdk-dev] [PATCH 6/7] examples: check status of getting MAC address Andrew Rybchenko
2019-09-10 8:52 ` [dpdk-dev] [PATCH 7/7] examples/bond: " Andrew Rybchenko
2019-09-24 13:23 ` [dpdk-dev] [PATCH 0/7] ethdev: change MAC addr get function 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=1568105541-7399-5-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=igor.romanov@oktetlabs.ru \
--cc=nikhil.rao@intel.com \
/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).