From: Pavan Nikhilesh Date: Mon, 11 Dec 2017 15:13:41 +0000 (+0530) Subject: app/eventdev: add pktmbuf pool for ethdev X-Git-Tag: spdx-start~210 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8577cc1af2778a20638beb90c8d8726b892c1c3b;p=dpdk.git app/eventdev: add pktmbuf pool for ethdev Add pktmbuf pool creation used when configuring ethernet device as event producer. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index a9710b2382..6a3517cf5e 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -384,13 +384,24 @@ perf_mempool_setup(struct evt_test *test, struct evt_options *opt) { struct test_perf *t = evt_test_priv(test); - t->pool = rte_mempool_create(test->name, /* mempool name */ + if (opt->prod_type == EVT_PROD_TYPE_SYNT) { + t->pool = rte_mempool_create(test->name, /* mempool name */ opt->pool_sz, /* number of elements*/ sizeof(struct perf_elt), /* element size*/ 512, /* cache size*/ 0, NULL, NULL, perf_elt_init, /* obj constructor */ NULL, opt->socket_id, 0); /* flags */ + } else { + t->pool = rte_pktmbuf_pool_create(test->name, /* mempool name */ + opt->pool_sz, /* number of elements*/ + 512, /* cache size*/ + 0, + RTE_MBUF_DEFAULT_BUF_SIZE, + opt->socket_id); /* flags */ + + } + if (t->pool == NULL) { evt_err("failed to create mempool"); return -ENOMEM;