[3/7] app/pdump: check status of getting MAC address
Checks
Commit Message
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/pdump/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -606,7 +606,10 @@ configure_vdev(uint16_t port_id)
if (ret < 0)
rte_exit(EXIT_FAILURE, "dev start failed\n");
- rte_eth_macaddr_get(port_id, &addr);
+ ret = rte_eth_macaddr_get(port_id, &addr);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE, "macaddr get failed\n");
+
printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8
" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n",
port_id,