From: Matias Elo <matias....@nokia.com> Use pool_alloc() directly instead of using internal DPDK wrapper function.
Fixes: https://github.com/Linaro/odp/issues/662 Signed-off-by: Matias Elo <matias....@nokia.com> Reported-by: Maxim Uvarov <maxim.uva...@linaro.org> --- /** Email created from pull request 663 (matiaselo:fix/remove_internal_dpdk_call) ** https://github.com/Linaro/odp/pull/663 ** Patch: https://github.com/Linaro/odp/pull/663.patch ** Base sha: d3191c08080c2e73d931697626d39c174f1c663f ** Merge commit sha: 7adce3da5da23412797f2ef8f327e03a935216a2 **/ platform/linux-generic/pktio/dpdk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 4e320aa08..caebdfe85 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -168,6 +168,8 @@ void refer_constructors(void) } #endif +static int pool_alloc(struct rte_mempool *mp); + static int lookup_opt(const char *opt_name, const char *drv_name, int *val) { const char *base = "pktio_dpdk"; @@ -341,7 +343,7 @@ static struct rte_mempool *mbuf_pool_create(const char *name, rte_pktmbuf_pool_init(mp, &mbp_priv); - if (rte_mempool_ops_alloc(mp)) { + if (pool_alloc(mp)) { ODP_ERR("Failed allocating mempool\n"); return NULL; }