On Mon, Jan 05, 2026 at 05:47:31PM +0000, Bruce Richardson wrote:
> On Fri, Dec 12, 2025 at 11:11:36AM +0000, Morten Brørup wrote:
> > When fast release of mbufs is enabled, the mempool to free the mbufs to
> > was determined by looking at the pool pointer of the first mbuf in the
> > burst being freed, potentially costing a cache miss.
> > 
> > This patch adds a mbuf fast release mempool pointer to the common transmit
> > queue structure, so reading the mbufs during fast release is avoided.
> > The pointer in located a cache line already being accessed,
> > and is only set once, when the first mbuf ever is released.
> > 
> > The fast release mempool pointer also indicates if fast release is
> > enabled, so this pointer is checked instead of the
> > RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE flag in the offloads field in the
> > transmit queue structure.
> > 
> > The same optimizations were applied to mbuf recycle.
> > 
> > For the ice driver, prefetcing the mbufs when fast release of mbufs is
> > enabled became superflouous, and has been moved into the branch for normal
> > mbuf release.
> > 
> > For the i40e driver, prefetcing the mbufs when fast release of mbufs is
> > enabled was already superflouous, and has been moved into the branch for
> > normal mbuf release.
> > 
> > Signed-off-by: Morten Brørup <[email protected]>
> > ---
> >  drivers/net/intel/common/recycle_mbufs.h | 10 +++++---
> >  drivers/net/intel/common/tx.h            | 14 +++++++++--
> >  drivers/net/intel/cpfl/cpfl_rxtx.c       |  2 ++
> >  drivers/net/intel/i40e/i40e_rxtx.c       | 31 +++++++++++++++---------
> >  drivers/net/intel/iavf/iavf_rxtx.c       |  2 ++
> >  drivers/net/intel/ice/ice_rxtx.c         | 15 +++++++++---
> >  drivers/net/intel/idpf/idpf_rxtx.c       |  2 ++
> >  drivers/net/intel/ixgbe/ixgbe_rxtx.c     |  2 ++
> >  8 files changed, 57 insertions(+), 21 deletions(-)
> > 
> 
> This change seems reasonable to me. Ran a quick test with 2 x 100G ports
> and saw no degradation in performance, and it seems to improve performance
> by maybe 1-2%, in that quick test.
> 
> Therefore:
> Acked-by: Bruce Richardson <[email protected]>
> 
Applied to next-net-intel.

Thanks,
/Bruce

Reply via email to