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

Function rte_ring_count

dpdk/lib/ring/rte_ring.h:501–508  ·  view source on GitHub ↗

* Return the number of entries in a ring. * * @param r * A pointer to the ring structure. * @return * The number of entries in the ring. */

Source from the content-addressed store, hash-verified

499 * The number of entries in the ring.
500 */
501static inline unsigned int
502rte_ring_count(const struct rte_ring *r)
503{
504 uint32_t prod_tail = r->prod.tail;
505 uint32_t cons_tail = r->cons.tail;
506 uint32_t count = (prod_tail - cons_tail) & r->mask;
507 return (count > r->capacity) ? r->capacity : count;
508}
509
510/**
511 * Return the number of free entries in a ring.

Callers 15

rte_ring_free_countFunction · 0.85
rte_ring_dumpFunction · 0.85
rte_hash_countFunction · 0.85
rxa_intr_ring_dequeueFunction · 0.85
rte_event_ring_countFunction · 0.85
rte_rcu_qsbr_dq_enqueueFunction · 0.85
rte_rcu_qsbr_dq_reclaimFunction · 0.85
common_ring_get_countFunction · 0.85
bucket_count_per_lcoreFunction · 0.85
bucket_get_countFunction · 0.85
__mlx5_hws_cnt_svcFunction · 0.85

Calls

no outgoing calls

Tested by 7

_cancel_threadFunction · 0.68
_cancel_burst_threadFunction · 0.68
remove_memberFunction · 0.68
test_mode4_expiredFunction · 0.68
check_environmentFunction · 0.68
test_mode4_executorFunction · 0.68