MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_mbuf_ext_refcnt_update

Function rte_mbuf_ext_refcnt_update

dpdk/lib/mbuf/rte_mbuf.h:495–507  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

493 * Updated value
494 */
495static inline uint16_t
496rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo,
497 int16_t value)
498{
499 if (likely(rte_mbuf_ext_refcnt_read(shinfo) == 1)) {
500 ++value;
501 rte_mbuf_ext_refcnt_set(shinfo, (uint16_t)value);
502 return (uint16_t)value;
503 }
504
505 return rte_atomic_fetch_add_explicit(&shinfo->refcnt, value,
506 rte_memory_order_acq_rel) + value;
507}
508
509/** Mbuf prefetch */
510#define RTE_MBUF_PREFETCH_TO_FREE(m) do { \

Callers 5

rte_pktmbuf_attachFunction · 0.85
hn_rxpktFunction · 0.85
hn_nvs_handle_rxbufFunction · 0.85

Calls 2

rte_mbuf_ext_refcnt_readFunction · 0.85
rte_mbuf_ext_refcnt_setFunction · 0.85

Tested by 1