> From: Kishore Padmanabha [mailto:[email protected]] > Sent: Friday, 13 November 2026 07.57 > > 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 <[email protected]> > ---
Important fix, thank you! Reviewed-by: Morten Brørup <[email protected]> If you have time/resources available, could you please check if similar fixes are required in other code where RTE_MEMPOOL_CACHE_MAX_SIZE used: https://elixir.bootlin.com/dpdk/v26.11-rc1/A/ident/RTE_MEMPOOL_CACHE_MAX_SIZE -Morten

