[dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question

Mihail Tarta mtarta at microsoft.com
Thu Mar 28 20:45:03 CET 2019


Hi,

I am wondering if the following behavior is a bug or it is by design. My scenario is the following. Let’s say that I create a file of 8MB and then mmap and mlock that in my application. I call rte_mempool_create_empty with elt_size of 4096 (getpagesize) and correct element count. Then I call rte_mempool_populate_virt for that empty mempool using with the end 2MB of memory from the mmap created from the 8MB file. This call always fails with EINVAL. Any other elt_size used for exactly the same scenario (64, 128, 256, 512, 1024, 2048) always succeeds without a problem. In all tests the file gets mapped at the same base address in my app. What am I doing wrong?

Thanks,
Mihail



More information about the dev mailing list