13 #ifndef _RTE_EVENT_RING_
14 #define _RTE_EVENT_RING_
24 #define RTE_TAILQ_EVENT_RING_NAME "RTE_EVENT_RING"
89 unsigned int n, uint16_t *free_space)
91 uint32_t prod_head, prod_next;
92 uint32_t free_entries;
94 n = __rte_ring_move_prod_head(&r->r, r->r.prod.single, n,
95 RTE_RING_QUEUE_VARIABLE,
96 &prod_head, &prod_next, &free_entries);
100 ENQUEUE_PTRS(&r->r, &r[1], prod_head, events, n,
struct rte_event);
102 update_tail(&r->r.prod, prod_head, prod_next, r->r.prod.single, 1);
104 if (free_space != NULL)
105 *free_space = free_entries - n;
130 unsigned int n, uint16_t *available)
132 uint32_t cons_head, cons_next;
135 n = __rte_ring_move_cons_head(&r->r, r->r.cons.single, n,
136 RTE_RING_QUEUE_VARIABLE,
137 &cons_head, &cons_next, &entries);
141 DEQUEUE_PTRS(&r->r, &r[1], cons_head, events, n,
struct rte_event);
143 update_tail(&r->r.cons, cons_head, cons_next, r->r.cons.single, 0);
146 if (available != NULL)
147 *available = entries - n;
181 unsigned int count,
unsigned int flags);
224 rte_event_ring_create(
const char *name,
unsigned int count,
int socket_id,
259 static inline unsigned int
273 static inline unsigned int
#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 __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)