X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd%2Fmain.c;h=720fd5ad6c58eb974fd28e861bf6d620497a846e;hb=d43777cb150867ebc9db4ca06977d52e854e3869;hp=24484b5ecff4eb2807f7c2209b7a9996ecbccc2e;hpb=81f7ecd934372fc9f592d1322f8eff86350fa4f5;p=dpdk.git diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 24484b5ecf..720fd5ad6c 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -70,11 +69,8 @@ #include #include -#include "main.h" - #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 -#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) #define NB_MBUF 8192 #define MAX_PKT_BURST 32 @@ -539,7 +535,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; @@ -563,13 +559,8 @@ MAIN(int argc, char **argv) rte_exit(EXIT_FAILURE, "Invalid L2FWD arguments\n"); /* create the mbuf pool */ - l2fwd_pktmbuf_pool = - rte_mempool_create("mbuf_pool", NB_MBUF, - MBUF_SIZE, 32, - sizeof(struct rte_pktmbuf_pool_private), - rte_pktmbuf_pool_init, NULL, - rte_pktmbuf_init, NULL, - rte_socket_id(), 0); + l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, + 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); if (l2fwd_pktmbuf_pool == NULL) rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n"); @@ -714,4 +705,3 @@ MAIN(int argc, char **argv) return 0; } -