From: Mihail Tarta <mtarta@microsoft.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] rte_mempool_create_empty/rte_mempool_populate_virt question
Date: Thu, 28 Mar 2019 19:45:03 +0000 [thread overview]
Message-ID: <F1B53F0A-67FD-4280-8FC0-F73502D22EE2@microsoft.com> (raw)
Message-ID: <20190328194503.a_gvwIurNRMKN7qCbIfFbhSi3yb0Pl4vogoPWPO1VI0@z> (raw)
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
next reply other threads:[~2019-03-28 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 19:45 Mihail Tarta [this message]
2019-03-28 19:45 ` Mihail Tarta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F1B53F0A-67FD-4280-8FC0-F73502D22EE2@microsoft.com \
--to=mtarta@microsoft.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).