DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: show mac address at initialization
@ 2014-04-30 13:29 David Marchand
  2014-05-16 14:27 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2014-04-30 13:29 UTC (permalink / raw)
  To: dev; +Cc: Zijie Pan

From: Zijie Pan <zijie.pan@6wind.com>

Display port number and MAC address at start up.
It is useful when configuring a packet generator.

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
---
 app/test-pmd/testpmd.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9c56914..a661d33 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1223,6 +1223,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");
@@ -1350,6 +1351,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;
 	}
-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-16 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 13:29 [dpdk-dev] [PATCH] app/testpmd: show mac address at initialization David Marchand
2014-05-16 14:27 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).