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 via email to