src/dpdk/lib/librte_mbuf/rte_mbuf.h
static inline uint16_t
rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo,
	int16_t value)
{
	if (likely(rte_mbuf_ext_refcnt_read(shinfo) == 1)) {
		++value;
		rte_mbuf_ext_refcnt_set(shinfo, (uint16_t)value);
		return (uint16_t)value;
	}

	return __atomic_add_fetch(&shinfo->refcnt, (uint16_t)value,
				 __ATOMIC_ACQ_REL);
}
/**
 * Add given value to refcnt of an external buffer and return its new
 * value.
 *
 * @param shinfo
 *   Shared data of the external buffer.
 * @param value
 *   Value to add/subtract
 * @return
 *   Updated value
 */
Add given value to refcnt of an external buffer and return its new
value.

@param shinfo
Shared data of the external buffer.
@param value
Value to add/subtract
@return
Updated value
Add given value to refcnt of an external buffer and return its new value . @param shinfo Shared data of the external buffer . @param value Value to add / subtract @return Updated value
static inline uint16_t
rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo,
	int16_t value)
{
	if (likely(rte_mbuf_ext_refcnt_read(shinfo) == 1)) {
		++value;
		rte_mbuf_ext_refcnt_set(shinfo, (uint16_t)value);
		return (uint16_t)value;
	}
	return __atomic_add_fetch(&shinfo->refcnt, (uint16_t)value,
				 __ATOMIC_ACQ_REL);
}
static inline uint16_t rte_mbuf_ext_refcnt_update ( struct rte_mbuf_ext_shared_info * shinfo , int16_t value ) { if ( likely ( rte_mbuf_ext_refcnt_read ( shinfo ) == 1 ) ) { ++ value ; rte_mbuf_ext_refcnt_set ( shinfo , ( uint16_t ) value ) ; return ( uint16_t ) value ; } return __atomic_add_fetch ( & shinfo -> refcnt , ( uint16_t ) value , __ATOMIC_ACQ_REL ) ; }
Add given value to refcnt of an external buffer and return its new
 value.
Add given value to refcnt of an external buffer and return its new value .