[dpdk-dev] [PATCH v2] mbuf: optimize rte_mbuf_refcnt_update

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Jun 12 16:10:48 CEST 2015


2015-06-09 13:57, Bruce Richardson:
> On Mon, Jun 08, 2015 at 04:57:22PM +0200, Olivier Matz wrote:
> > In __rte_pktmbuf_prefree_seg(), there was an optimization to avoid using
> > a costly atomic operation when updating the mbuf reference counter if
> > its value is 1. Indeed, it means that we are the only owner of the mbuf,
> > and therefore nobody can change it at the same time.
> > 
> > We can generalize this optimization directly in rte_mbuf_refcnt_update()
> > so the other callers of this function, like rte_pktmbuf_attach(), can
> > also take advantage of this optimization.
> > 
> > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> 
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Applied, thanks


More information about the dev mailing list