examples/vmdq_dcb: display port mac address
authorIntel <intel.com>
Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Sep 2013 12:16:09 +0000 (14:16 +0200)
Signed-off-by: Intel
examples/vmdq_dcb/main.c

index 7c744ef..86ef653 100644 (file)
@@ -225,6 +225,14 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
        if (retval < 0)
                return retval;
 
+       struct ether_addr addr;
+       rte_eth_macaddr_get(port, &addr);
+       printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8
+                       " %02"PRIx8" %02"PRIx8" %02"PRIx8"\n",
+                       (unsigned)port,
+                       addr.addr_bytes[0], addr.addr_bytes[1], addr.addr_bytes[2],
+                       addr.addr_bytes[3], addr.addr_bytes[4], addr.addr_bytes[5]);
+
        return 0;
 }