X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_reassembly%2Fmain.c;h=9ecb6f92c9f50c48b8fab5018e53428eb75501d3;hb=824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44;hp=0d92b3caf63de8c5465822bcdf8541bbd53deb1f;hpb=81f7ecd934372fc9f592d1322f8eff86350fa4f5;p=dpdk.git diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 0d92b3caf6..9ecb6f92c9 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -79,8 +78,6 @@ #include -#include "main.h" - #define MAX_PKT_BURST 32 @@ -88,7 +85,7 @@ #define MAX_JUMBO_PKT_LEN 9600 -#define BUF_SIZE 2048 +#define BUF_SIZE RTE_MBUF_DEFAULT_DATAROOM #define MBUF_SIZE \ (BUF_SIZE + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) @@ -729,13 +726,9 @@ parse_args(int argc, char **argv) static void print_ethaddr(const char *name, const 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 */ @@ -864,7 +857,7 @@ setup_port_tbl(struct lcore_queue_conf *qconf, uint32_t lcore, int socket, n = RTE_MAX(max_flow_num, 2UL * MAX_PKT_BURST); sz = sizeof (*mtb) + sizeof (mtb->m_table[0]) * n; - if ((mtb = rte_zmalloc_socket(__func__, sz, CACHE_LINE_SIZE, + if ((mtb = rte_zmalloc_socket(__func__, sz, RTE_CACHE_LINE_SIZE, socket)) == NULL) { RTE_LOG(ERR, IP_RSMBL, "%s() for lcore: %u, port: %u " "failed to allocate %zu bytes\n", @@ -1016,7 +1009,7 @@ signal_handler(int signum) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info;