examples/vmdq_dcb: display port mac address
[dpdk.git] / 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;
 }