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

Thomas Monjalon thomas at monjalon.net
Fri Jan 19 00:23:40 CET 2018


08/12/2017 16:46, Olivier Matz:
> 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>

Applied, thanks



More information about the dev mailing list