From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Olivier Matz" <olivier.matz@6wind.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] rte_mempool_create conflicting parameter advice
Date: Thu, 3 Jun 2021 21:01:36 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C61819@smartserver.smartshare.dk> (raw)
Olivier, Andrew (Memory pool maintainers)
While reviewing documentation for the parameters to rte_mempool_create(), I noticed these two conflicting recommendations:
1. n (the number of elements in the pool) is advised to be a power of two minus one.
2. cache_size is advised to have "n modulo cache_size == 0".
E.g. n could be 0xFFFF, but then n modulo any value cannot be 0.
The cache_size parameter description tells what happens when not following the advice.
The n parameter description should also tell what happens when not following the advice.
Furthermore, the documentation for rte_pktmbuf_pool_create() and alike simply refer to the documentation for rte_mempool_create() regarding the cache_size parameter, although they copy the documentation regarding the n parameter. If the cache_size advice is important, it should be copied rather than simply referred to.
reply other threads:[~2021-06-03 19:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=98CBD80474FA8B44BF855DF32C47DC35C61819@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
/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).