X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Futil.c;h=faf247c3f489a2fa2fbd268117c9c490456915c2;hb=a5279d25616d;hp=19d36777a939471ad9ab7eb34e650ee7575416b3;hpb=1cde5e0acaface5862cb6699c4cee399b7a5280f;p=dpdk.git diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 19d36777a9..faf247c3f4 100644 --- a/app/test-pmd/util.c +++ b/app/test-pmd/util.c @@ -274,3 +274,16 @@ eth_link_get_nowait_print_err(uint16_t port_id, struct rte_eth_link *link) return ret; } + +int +eth_macaddr_get_print_err(uint16_t port_id, struct rte_ether_addr *mac_addr) +{ + int ret; + + ret = rte_eth_macaddr_get(port_id, mac_addr); + if (ret != 0) + printf("Error getting device (port %u) mac address: %s\n", + port_id, rte_strerror(-ret)); + + return ret; +}