[dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

Olivier MATZ olivier.matz at 6wind.com
Mon Dec 11 11:28:25 CET 2017


On Fri, Dec 08, 2017 at 04:46:51PM +0100, Olivier Matz wrote:
> When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference
> counter uses an atomic operation. This is not necessary and impacts
> the performance (seen with TRex traffic generator).
> 
> We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update()
> because it would add an additional check.
> 
> Solves this by introducing __rte_mbuf_refcnt_update(), which
> updates the reference counter without doing anything else.
> 
> Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool")
> Suggested-by: Hanoch Haim <hhaim at cisco.com>
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>

Forgot to Cc stable at dpdk.org


More information about the dev mailing list