src/dpdk/lib/librte_mbuf/rte_mbuf.h
static inline int __rte_pktmbuf_pinned_extbuf_decref(struct rte_mbuf *m)
{
	struct rte_mbuf_ext_shared_info *shinfo;

	/* Clear flags, mbuf is being freed. */
	m->ol_flags = EXT_ATTACHED_MBUF;
	shinfo = m->shinfo;

	/* Optimize for performance - do not dec/reinit */
	if (likely(rte_mbuf_ext_refcnt_read(shinfo) == 1))
		return 0;

	/*
	 * Direct usage of add primitive to avoid
	 * duplication of comparing with one.
	 */
	if (likely(__atomic_add_fetch(&shinfo->refcnt, (uint16_t)-1,
				     __ATOMIC_ACQ_REL)))
		return 1;

	/* Reinitialize counter before mbuf freeing. */
	rte_mbuf_ext_refcnt_set(shinfo, 1);
	return 0;
}
/**
 * @internal Handle the packet mbufs with attached pinned external buffer
 * on the mbuf freeing:
 *
 *  - return zero if reference counter in shinfo is one. It means there is
 *  no more reference to this pinned buffer and mbuf can be returned to
 *  the pool
 *
 *  - otherwise (if reference counter is not one), decrement reference
 *  counter and return non-zero value to prevent freeing the backing mbuf.
 *
 * Returns non zero if mbuf should not be freed.
 */
@internal Handle the packet mbufs with attached pinned external buffer
on the mbuf freeing.

- return zero if reference counter in shinfo is one. It means there is
no more reference to this pinned buffer and mbuf can be returned to
the pool

- otherwise (if reference counter is not one), decrement reference
counter and return non-zero value to prevent freeing the backing mbuf.

Returns non zero if mbuf should not be freed.
@internal Handle the packet mbufs with attached pinned external buffer on the mbuf freeing . - return zero if reference counter in shinfo is one . It means there is no more reference to this pinned buffer and mbuf can be returned to the pool - otherwise ( if reference counter is not one ) decrement reference counter and return non - zero value to prevent freeing the backing mbuf . Returns non zero if mbuf should not be freed .
static inline int __rte_pktmbuf_pinned_extbuf_decref(struct rte_mbuf *m)
{
	struct rte_mbuf_ext_shared_info *shinfo;
	m->ol_flags = EXT_ATTACHED_MBUF;
	shinfo = m->shinfo;
	if (likely(rte_mbuf_ext_refcnt_read(shinfo) == 1))
		return 0;
	if (likely(__atomic_add_fetch(&shinfo->refcnt, (uint16_t)-1,
				     __ATOMIC_ACQ_REL)))
		return 1;
	rte_mbuf_ext_refcnt_set(shinfo, 1);
	return 0;
}
static inline int __rte_pktmbuf_pinned_extbuf_decref ( struct rte_mbuf * m ) { struct rte_mbuf_ext_shared_info * shinfo ; m -> ol_flags = EXT_ATTACHED_MBUF ; shinfo = m -> shinfo ; if ( likely ( rte_mbuf_ext_refcnt_read ( shinfo ) == 1 ) ) return 0 ; if ( likely ( __atomic_add_fetch ( & shinfo -> refcnt , ( uint16_t ) -1 , __ATOMIC_ACQ_REL ) ) ) return 1 ; rte_mbuf_ext_refcnt_set ( shinfo , 1 ) ; return 0 ; }
@internal Handle the packet mbufs with attached pinned external buffer
 on the mbuf freeing:
@internal Handle the packet mbufs with attached pinned external buffer on the mbuf freeing :
/* Clear flags, mbuf is being freed. */ /* Optimize for performance - do not dec/reinit */ /*
	 * Direct usage of add primitive to avoid
	 * duplication of comparing with one.
	 */ /* Reinitialize counter before mbuf freeing. */