13 #ifndef _RTE_EVENT_RING_ 14 #define _RTE_EVENT_RING_ 28 #define RTE_TAILQ_EVENT_RING_NAME "RTE_EVENT_RING" 93 unsigned int n, uint16_t *free_space)
95 uint32_t prod_head, prod_next;
96 uint32_t free_entries;
98 n = __rte_ring_move_prod_head(&r->r, r->r.prod.single, n,
99 RTE_RING_QUEUE_VARIABLE,
100 &prod_head, &prod_next, &free_entries);
104 ENQUEUE_PTRS(&r->r, &r[1], prod_head, events, n,
struct rte_event);
106 update_tail(&r->r.prod, prod_head, prod_next, r->r.prod.single, 1);
108 if (free_space != NULL)
109 *free_space = free_entries - n;
134 unsigned int n, uint16_t *available)
136 uint32_t cons_head, cons_next;
139 n = __rte_ring_move_cons_head(&r->r, r->r.cons.single, n,
140 RTE_RING_QUEUE_VARIABLE,
141 &cons_head, &cons_next, &entries);
145 DEQUEUE_PTRS(&r->r, &r[1], cons_head, events, n,
struct rte_event);
147 update_tail(&r->r.cons, cons_head, cons_next, r->r.cons.single, 0);
150 if (available != NULL)
151 *available = entries - n;
185 unsigned int count,
unsigned int flags);
228 rte_event_ring_create(
const char *name,
unsigned int count,
int socket_id,
263 static inline unsigned int 277 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)