The rte_mempool_get_bulk() documentation says:

"If cache is enabled, objects will be retrieved first from cache, subsequently 
from the common pool."

But __mempool_generic_get() only uses the cache if the request is smaller than 
the cache size. If not, objects will be retrieved from the common pool only.

Either the documentation should be corrected, or the implementation should 
behave as described, i.e. retrieve the first of the objects from the cache and 
the remaining objects from the common pool.


PS: I stumbled into this while writing the unit test for mbuf bulk alloc/free.

PPS: It seems unit tests for mempool bulk alloc/free are missing. :-)


Med venlig hilsen / kind regards
- Morten Brørup


Reply via email to