DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question
@ 2019-03-28 19:45 Mihail Tarta
  2019-03-28 19:45 ` Mihail Tarta
  0 siblings, 1 reply; 2+ messages in thread
From: Mihail Tarta @ 2019-03-28 19:45 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question
  2019-03-28 19:45 [dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question Mihail Tarta
@ 2019-03-28 19:45 ` Mihail Tarta
  0 siblings, 0 replies; 2+ messages in thread
From: Mihail Tarta @ 2019-03-28 19:45 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-28 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 19:45 [dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question Mihail Tarta
2019-03-28 19:45 ` Mihail Tarta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).