summaryrefslogtreecommitdiff
path: root/examples/skeleton
diff options
context:
space:
mode:
authorIgor Romanov <igor.romanov@oktetlabs.ru>2019-09-10 09:52:20 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:55 +0200
commit70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8 (patch)
treee0d769ff6c24eae32e3c74b3f7057f50761f56fc /examples/skeleton
parent6fcf85860575b4075a1fc255e7907afe359178b3 (diff)
downloaddpdk-70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8.zip
dpdk-70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8.tar.gz
dpdk-70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8.tar.xz
examples: check status of getting MAC address
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>
Diffstat (limited to 'examples/skeleton')
-rw-r--r--examples/skeleton/basicfwd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index 8f1805a..73d313b 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -89,7 +89,10 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
/* 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",
port,