git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hns3: support multiple process
[dpdk.git]
/
examples
/
vm_power_manager
/
main.c
diff --git
a/examples/vm_power_manager/main.c
b/examples/vm_power_manager/main.c
index
ed18177
..
d39f044
100644
(file)
--- 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;
/* 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,
printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
" %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
(unsigned int)port,