10#ifndef _RTE_RING_GENERIC_PVT_H_
11#define _RTE_RING_GENERIC_PVT_H_
15 uint32_t new_val, uint32_t single, uint32_t enqueue)
27 rte_memory_order_relaxed);
56__rte_ring_move_prod_head(
struct rte_ring *r,
unsigned int is_sp,
58 uint32_t *old_head, uint32_t *new_head,
59 uint32_t *free_entries)
61 const uint32_t capacity = r->
capacity;
69 *old_head = r->prod.head;
82 *free_entries = (capacity + r->cons.tail - *old_head);
92 *new_head = *old_head + n;
94 r->prod.head = *new_head;
98 *old_head, *new_head);
127__rte_ring_move_cons_head(
struct rte_ring *r,
unsigned int is_sc,
129 uint32_t *old_head, uint32_t *new_head,
132 unsigned int max = n;
140 *old_head = r->cons.head;
152 *entries = (r->prod.tail - *old_head);
161 *new_head = *old_head + n;
163 r->cons.head = *new_head;
168 *old_head, *new_head);
static int rte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_t src)
static void rte_smp_wmb(void)
static void rte_smp_rmb(void)
#define __rte_always_inline
static __rte_always_inline void rte_wait_until_equal_32(volatile uint32_t *addr, uint32_t expected, rte_memory_order memorder)