]> git.droids-corp.org - dpdk.git/blobdiff - examples/skeleton/basicfwd.c
examples: check status of getting MAC address
[dpdk.git] / examples / skeleton / basicfwd.c
index 8f1805aeb59f2b9fffd0a7156205b872a1862964..73d313b84ed1da40a1c645c2954d559fb63d7fc9 100644 (file)
@@ -89,7 +89,10 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 
        /* 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",
                        port,