getting error error setting mempool handle:: Invalid argument

Viewed 28

I am trying to migrate my code from dpdk version 17.11 to dpdk 19.11. I am seeing this error when i try to create a mbuf pool. The error returned is Invalid argument. What am i missing here ?

Code Snippet:

struct rte_mempool *pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, MEMPOOL_CACHE_SZ, 0, MBUF_DATA_SZ, rte_socket_id());

[Logs]

  1. Platform - x86_64
  2. Library Mode - shared
  3. error reason - EINVAL
1 Answers

DPDK rte_pktmbuf_pool_create can be created in RING mode or STACK Mode. The default mode is ring mode alloc-free. If the Applications are built in shared library mode, one needs to pass the requested library or path to the library using EAL option -d.

Note: This is valid from DPDK 19.11 LTS onwards as libdpdk.so is just a file which holds the names of libraries built for.

Solution:

  1. Modify EAL args with the option -d for mempool_ring
  2. Modify the LDFLAGS to include mempool_ring (similar to testpmd) to avoid passing EAL arg option -d.

[EDIT-1] as updated in a comment the problem is resolved for @AmitLimaye by passing -d librte_mempool_ring.so

Related