summaryrefslogtreecommitdiff
path: root/examples/vmdq
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/vmdq
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/vmdq')
-rw-r--r--examples/vmdq/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 91f9a99..6e6fc91 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -276,7 +276,12 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
return retval;
}
- rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]);
+ retval = rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]);
+ if (retval < 0) {
+ printf("port %d MAC address get failed: %s\n", port,
+ rte_strerror(-retval));
+ return retval;
+ }
printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8
" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n",
(unsigned)port,