Skip to contentSkip to conversation

rte_mbuf.h / rte_pktmbuf_prefree_seg / rte_atomic16

DISCUSSION Hanoch Haim (hhaim) 1 participant 1 message Nov 14, 2017

lore
Share & tools
lore
#0 lore raw

Hi All,
I've found a minor issue in the function "rte_pktmbuf_prefree_seg"

This code is located here :

/dpdk/lib/librte_mbuf/rte_mbuf.h

- } else if (rte_atomic16_add_return(&m->refcnt_atomic, -1) == 0)

Should be :

+ } else if (likely(rte_mbuf_refcnt_update(m, -1) == 0)) {

This depends on RTE_MBUF_REFCNT_ATOMIC define

Thanks,
Hanoh