net: add macro to extract MAC address bytes
[dpdk.git] / examples / bbdev_app / main.c
index 2e170ca..adbd408 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdint.h>
 #include <inttypes.h>
 #include <sys/types.h>
-#include <sys/unistd.h>
+#include <unistd.h>
 #include <sys/queue.h>
 #include <stdarg.h>
 #include <ctype.h>
@@ -285,14 +285,9 @@ signal_handler(int signum)
 static void
 print_mac(unsigned int portid, struct rte_ether_addr *bbdev_ports_eth_address)
 {
-       printf("Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n\n",
+       printf("Port %u, MAC address: " RTE_ETHER_ADDR_PRT_FMT "\n\n",
                        (unsigned int) portid,
-                       bbdev_ports_eth_address->addr_bytes[0],
-                       bbdev_ports_eth_address->addr_bytes[1],
-                       bbdev_ports_eth_address->addr_bytes[2],
-                       bbdev_ports_eth_address->addr_bytes[3],
-                       bbdev_ports_eth_address->addr_bytes[4],
-                       bbdev_ports_eth_address->addr_bytes[5]);
+                       RTE_ETHER_ADDR_BYTES(bbdev_ports_eth_address));
 }
 
 static inline void
@@ -1195,5 +1190,8 @@ main(int argc, char **argv)
                ret |= rte_eal_wait_lcore(lcore_id);
        }
 
+       /* clean up the EAL */
+       rte_eal_cleanup();
+
        return ret;
 }