Skip to content

Commit

Permalink
linux-gen: dpdk: fix calling internal dpdk function
Browse files Browse the repository at this point in the history
Use pool_alloc() directly instead of using internal DPDK wrapper function.

Fixes: #662

Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reported-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
  • Loading branch information
MatiasElo authored and muvarov committed Aug 2, 2018
1 parent 6e741de commit acebc12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/linux-generic/pktio/dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit acebc12

Please sign in to comment.