summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
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/ipv4_multicast
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/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 7389bee..464b546 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -739,7 +739,12 @@ main(int argc, char **argv)
"Cannot adjust number of descriptors: 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);
+
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");