From: Igor Romanov <igor.roma...@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.roma...@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
---
 app/test/test_event_eth_rx_adapter.c | 4 +++-
 app/test/test_event_eth_tx_adapter.c | 4 +++-
 app/test/test_pmd_perf.c             | 7 ++++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/test/test_event_eth_rx_adapter.c 
b/app/test/test_event_eth_rx_adapter.c
index 6254fcd33..dd3bce71b 100644
--- a/app/test/test_event_eth_rx_adapter.c
+++ b/app/test/test_event_eth_rx_adapter.c
@@ -81,7 +81,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf 
*port_conf,
 
        /* 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",
                        (unsigned int)port,
diff --git a/app/test/test_event_eth_tx_adapter.c 
b/app/test/test_event_eth_tx_adapter.c
index 73f6afea2..3af749280 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -85,7 +85,9 @@ port_init_common(uint8_t port, const struct rte_eth_conf 
*port_conf,
 
        /* 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",
                        (unsigned int)port,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 36b06ce5d..d61be58bb 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -724,7 +724,12 @@ test_pmd_perf(void)
                                "Cannot configure device: 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);
+
                printf("Port %u ", portid);
                print_ethaddr("Address:", &ports_eth_addr[portid]);
                printf("\n");
-- 
2.17.1

Reply via email to