X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd%2Fmain.c;h=3827aa44530574390f04a11ac035a6e81fdf3cf9;hb=fa0eea389ba867614a44c7613d6390f9944e5526;hp=469eee876edd54d0a8294a864d9877a3dbc0a5f1;hpb=2412742cf64dfacc8beb0f3daafeb3b498328924;p=dpdk.git diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 469eee876e..3827aa4453 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -68,7 +68,6 @@ #include #include #include -#include #include #include @@ -80,6 +79,7 @@ static volatile bool force_quit; #define MAX_PKT_BURST 32 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ +#define MEMPOOL_CACHE_SIZE 256 /* * Configurable number of RX/TX ring descriptors @@ -545,8 +545,9 @@ main(int argc, char **argv) timer_period *= rte_get_timer_hz(); /* create the mbuf pool */ - l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, - 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); + l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, + MEMPOOL_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE, + rte_socket_id()); if (l2fwd_pktmbuf_pool == NULL) rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");