> From: Bruce Richardson [mailto:bruce.richard...@intel.com]
> Sent: Friday, 21 February 2025 18.10
> 
> On Fri, Feb 21, 2025 at 05:58:21PM +0100, Morten Brørup wrote:
> > Intel NIC folks,
> >
> > Why do the Intel network drivers, when using
> > RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE, fall back to normal freeing when
> the
> > mempool cache is empty (cache->len == 0)? It doesn't make sense to
> me.
> >
> > Example:
> > https://git.dpdk.org/dpdk/tree/drivers/net/intel/common/tx.h#n146
> >
> Good question. I suspect that it may be a bug and that we meant to
> check
> for size == 0 rather than len == 0.

Then checking for cache == NULL suffices, because rte_mempool_default_cache() 
returns NULL if the cache size is 0:
https://elixir.bootlin.com/dpdk/v24.11.1/source/lib/mempool/rte_mempool.h#L1333

Reply via email to