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
examples: check status of getting MAC address
[dpdk.git]
/
examples
/
vmdq_dcb
/
main.c
diff --git
a/examples/vmdq_dcb/main.c
b/examples/vmdq_dcb/main.c
index
2122e41
..
594c4f1
100644
(file)
--- a/
examples/vmdq_dcb/main.c
+++ b/
examples/vmdq_dcb/main.c
@@
-333,7
+333,12
@@
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
return retval;
}
return retval;
}
- rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]);
+ retval = rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]);
+ if (retval < 0) {
+ printf("port %d MAC address get failed: %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)port,
printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8
" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n",
(unsigned)port,