public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Praveen Shetty <praveen.shetty@intel.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	<dev@dpdk.org>
Subject: Re: [PATCH] net/intel: cache mbuf fast release mempool
Date: Wed, 14 Jan 2026 14:45:30 +0000	[thread overview]
Message-ID: <aWesClwkYBjDiuwV@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <aVv5M8mXjOOIMdKU@bricha3-mobl1.ger.corp.intel.com>

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 <mb@smartsharesystems.com>
> > ---
> >  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 <bruce.richardson@intel.com>
> 
Applied to next-net-intel.

Thanks,
/Bruce

      reply	other threads:[~2026-01-14 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12 11:11 [PATCH] net/intel: cache mbuf fast release mempool Morten Brørup
2026-01-05 17:47 ` Bruce Richardson
2026-01-14 14:45   ` Bruce Richardson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aWesClwkYBjDiuwV@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=mb@smartsharesystems.com \
    --cc=praveen.shetty@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox