X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fmulti_process%2Fsymmetric_mp%2Fmain.c;h=6bbff076aae2d93ec0c1c358e95058a6ca2c70c6;hb=fbb280b6aed17d009f37c814ba4390ed06836830;hp=2fc2acf870df3de276c4b705d197b04f74f0e712;hpb=94aa16b45c722156df8c458c4e841b991b072688;p=dpdk.git diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 2fc2acf870..6bbff076aa 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -79,7 +78,6 @@ #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1 -#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) #define NB_MBUFS 64*1024 /* use 64k mbufs */ #define MBUF_CACHE_SIZE 256 #define PKT_BURST 32 @@ -198,7 +196,7 @@ smp_parse_args(int argc, char **argv) ret = optind-1; optind = 0; /* reset getopt lib */ - return (ret); + return ret; } /* @@ -390,7 +388,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) continue; } /* clear all_ports_up flag if any link down */ - if (link.link_status == 0) { + if (link.link_status == ETH_LINK_DOWN) { all_ports_up = 0; break; } @@ -447,11 +445,9 @@ main(int argc, char **argv) proc_type = rte_eal_process_type(); mp = (proc_type == RTE_PROC_SECONDARY) ? rte_mempool_lookup(_SMP_MBUF_POOL) : - rte_mempool_create(_SMP_MBUF_POOL, NB_MBUFS, MBUF_SIZE, - MBUF_CACHE_SIZE, sizeof(struct rte_pktmbuf_pool_private), - rte_pktmbuf_pool_init, NULL, - rte_pktmbuf_init, NULL, - rte_socket_id(), 0); + rte_pktmbuf_pool_create(_SMP_MBUF_POOL, NB_MBUFS, + MBUF_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE, + rte_socket_id()); if (mp == NULL) rte_exit(EXIT_FAILURE, "Cannot get memory pool for buffers\n");