简体   繁体   中英

getting error error setting mempool handle:: Invalid argument

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM