doc: nics guide
[dpdk.git] / examples / ip_fragmentation / main.c
index 65c4cf6..93ea2a1 100644 (file)
@@ -49,7 +49,6 @@
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_launch.h>
@@ -75,8 +74,6 @@
 
 #include <rte_ip_frag.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_IP_FRAG RTE_LOGTYPE_USER1
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
@@ -600,13 +597,9 @@ parse_args(int argc, char **argv)
 static void
 print_ethaddr(const char *name, struct ether_addr *eth_addr)
 {
-       printf("%s%02X:%02X:%02X:%02X:%02X:%02X", name,
-              eth_addr->addr_bytes[0],
-              eth_addr->addr_bytes[1],
-              eth_addr->addr_bytes[2],
-              eth_addr->addr_bytes[3],
-              eth_addr->addr_bytes[4],
-              eth_addr->addr_bytes[5]);
+       char buf[ETHER_ADDR_FMT_SIZE];
+       ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+       printf("%s%s", name, buf);
 }
 
 /* Check the link status of all ports in up to 9s, and print them finally */
@@ -811,7 +804,7 @@ init_mem(void)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
        struct rte_eth_dev_info dev_info;