All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] rte_mempool_create conflicting parameter advice
@ 2021-06-03 19:01 Morten Brørup
  0 siblings, 0 replies; only message in thread
From: Morten Brørup @ 2021-06-03 19:01 UTC (permalink / raw)
  To: Olivier Matz, Andrew Rybchenko; +Cc: dev

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-03 19:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 19:01 [dpdk-dev] rte_mempool_create conflicting parameter advice Morten Brørup

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.