[PATCH v2 1/3] mempool: remove assumptions on maximum cache size

Thomas Monjalon thomas at monjalon.net
Wed Nov 18 23:29:36 CET 2026


13/11/2026 20:44, Kishore Padmanabha:
> Since the cache size limit was removed, a mempool cache can be created
> with any size up to the number of objects in the mempool.
> RTE_MEMPOOL_CACHE_MAX_SIZE is therefore no longer an upper bound for
> the cache size, nor for the number of objects in the cache.
> 
> The put and get functions still passed assumptions derived from this
> constant to the compiler. They are wrong for a cache larger than
> RTE_MEMPOOL_CACHE_MAX_SIZE, and violating a compiler assumption is
> undefined behavior.
> 
> Remove the assumptions based on the constant, and assume that the number
> of objects in the cache does not exceed the cache size instead.
> 
> Fixes: b815acfdfc48 ("mempool: remove cache size limit")
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> Reviewed-by: Morten Brorup <mb at smartsharesystems.com>

Series applied, thanks.





More information about the dev mailing list