From: Zijie Pan Date: Wed, 30 Apr 2014 13:29:48 +0000 (+0200) Subject: app/testpmd: show mac address at initialization X-Git-Tag: spdx-start~10831 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d8c89163cb8955f409ba743b243c91d6b4203ac6;p=dpdk.git app/testpmd: show mac address at initialization Display port number and MAC address at start up. It is useful when configuring a packet generator. Signed-off-by: Zijie Pan Acked-by: Thomas Monjalon --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 8b3e5c4152..a4a803223b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1227,6 +1227,7 @@ start_port(portid_t pid) portid_t pi; queueid_t qi; struct rte_port *port; + uint8_t *mac_addr; if (test_done == 0) { printf("Please stop forwarding first\n"); @@ -1354,6 +1355,11 @@ start_port(portid_t pid) RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0) printf("Port %d can not be set into started\n", pi); + mac_addr = port->eth_addr.addr_bytes; + printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi, + mac_addr[0], mac_addr[1], mac_addr[2], + mac_addr[3], mac_addr[4], mac_addr[5]); + /* at least one port started, need checking link status */ need_check_link_status = 1; }