X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=examples%2Fvm_power_manager%2Fmain.c;h=d39f044c1ed1f507dd1d3a08f8741e7fc231414a;hb=23d4b61fee5dc75ced7938169dc87a6174a093aa;hp=ed18177574b9bace4c10de67047441443ebe9db2;hpb=22e5c73bd181ddae758189295146154542b63360;p=dpdk.git diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index ed18177574..d39f044c1e 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -112,7 +112,13 @@ 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) { + printf("Failed to get device (port %u) MAC address: %s\n", + port, rte_strerror(-retval)); + return retval; + } + printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n", (unsigned int)port,