41 #ifndef _RTE_EVENT_RING_
42 #define _RTE_EVENT_RING_
52 #define RTE_TAILQ_EVENT_RING_NAME "RTE_EVENT_RING"
117 unsigned int n, uint16_t *free_space)
119 uint32_t prod_head, prod_next;
120 uint32_t free_entries;
122 n = __rte_ring_move_prod_head(&r->r, r->r.prod.single, n,
123 RTE_RING_QUEUE_VARIABLE,
124 &prod_head, &prod_next, &free_entries);
128 ENQUEUE_PTRS(&r->r, &r[1], prod_head, events, n,
struct rte_event);
131 update_tail(&r->r.prod, prod_head, prod_next, 1);
133 if (free_space != NULL)
134 *free_space = free_entries - n;
159 unsigned int n, uint16_t *available)
161 uint32_t cons_head, cons_next;
164 n = __rte_ring_move_cons_head(&r->r, r->r.cons.single, n,
165 RTE_RING_QUEUE_VARIABLE,
166 &cons_head, &cons_next, &entries);
170 DEQUEUE_PTRS(&r->r, &r[1], cons_head, events, n,
struct rte_event);
173 update_tail(&r->r.cons, cons_head, cons_next, 1);
176 if (available != NULL)
177 *available = entries - n;
211 unsigned int count,
unsigned int flags);
254 rte_event_ring_create(
const char *name,
unsigned int count,
int socket_id,
289 static inline unsigned int
303 static inline unsigned int
static void rte_smp_rmb(void)
#define __rte_always_inline
struct rte_event_ring * rte_event_ring_lookup(const char *name)
void rte_event_ring_free(struct rte_event_ring *r)
static __rte_always_inline unsigned int rte_event_ring_enqueue_burst(struct rte_event_ring *r, const struct rte_event *events, unsigned int n, uint16_t *free_space)
static unsigned int rte_ring_get_capacity(const struct rte_ring *r)
static unsigned int rte_ring_get_size(const struct rte_ring *r)
static __rte_always_inline unsigned int rte_event_ring_free_count(const struct rte_event_ring *r)
static unsigned int rte_event_ring_get_capacity(const struct rte_event_ring *r)
static void rte_smp_wmb(void)
static __rte_always_inline unsigned int rte_event_ring_dequeue_burst(struct rte_event_ring *r, struct rte_event *events, unsigned int n, uint16_t *available)
static unsigned rte_ring_count(const struct rte_ring *r)
static __rte_always_inline unsigned int rte_event_ring_count(const struct rte_event_ring *r)
static unsigned rte_ring_free_count(const struct rte_ring *r)
static unsigned int rte_event_ring_get_size(const struct rte_event_ring *r)