]> git.droids-corp.org - dpdk.git/blobdiff - examples/l3fwd-power/main.c
examples: check status of getting MAC address
[dpdk.git] / examples / l3fwd-power / main.c
index 2e3b1d3c63c2bb6381b6033b30a1096447213d68..a03f64a1a35a1317f29ffd71efd8b7192fe4c936 100644 (file)
@@ -2323,7 +2323,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(", ");