[3/7] app/pdump: check status of getting MAC address

Message ID 1568105541-7399-4-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: change MAC addr get function return value to int |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko Sept. 10, 2019, 8:52 a.m. UTC
  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(-)
  

Patch

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 9d6be8ed1..903d02f48 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -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,