10 #ifndef _RTE_RING_PEEK_H_
11 #define _RTE_RING_PEEK_H_
57 __rte_ring_do_enqueue_start(
struct rte_ring *r, uint32_t n,
60 uint32_t free, head, next;
65 behavior, &head, &next, &free);
67 case RTE_RING_SYNC_MT_HTS:
68 n = __rte_ring_hts_move_prod_head(r, n, behavior,
72 case RTE_RING_SYNC_MT_RTS:
80 if (free_space != NULL)
81 *free_space = free - n;
105 unsigned int *free_space)
131 unsigned int *free_space)
156 unsigned int *free_space)
182 unsigned int *free_space)
206 unsigned int esize,
unsigned int n)
212 n = __rte_ring_st_get_tail(&r->prod, &tail, n);
214 __rte_ring_enqueue_elems(r, tail, obj_table, esize, n);
215 __rte_ring_st_set_head_tail(&r->prod, tail, n, 1);
217 case RTE_RING_SYNC_MT_HTS:
218 n = __rte_ring_hts_get_tail(&r->hts_prod, &tail, n);
220 __rte_ring_enqueue_elems(r, tail, obj_table, esize, n);
221 __rte_ring_hts_set_head_tail(&r->hts_prod, tail, n, 1);
224 case RTE_RING_SYNC_MT_RTS:
256 __rte_ring_do_dequeue_start(
struct rte_ring *r,
void *obj_table,
260 uint32_t avail, head, next;
265 behavior, &head, &next, &avail);
267 case RTE_RING_SYNC_MT_HTS:
268 n = __rte_ring_hts_move_cons_head(r, n, behavior,
272 case RTE_RING_SYNC_MT_RTS:
281 __rte_ring_dequeue_elems(r, head, obj_table, esize, n);
283 if (available != NULL)
284 *available = avail - n;
312 unsigned int esize,
unsigned int n,
unsigned int *available)
314 return __rte_ring_do_dequeue_start(r, obj_table, esize, n,
338 unsigned int n,
unsigned int *available)
368 unsigned int esize,
unsigned int n,
unsigned int *available)
370 return __rte_ring_do_dequeue_start(r, obj_table, esize, n,
394 unsigned int n,
unsigned int *available)
397 sizeof(uintptr_t), n, available);
418 n = __rte_ring_st_get_tail(&r->cons, &tail, n);
419 __rte_ring_st_set_head_tail(&r->cons, tail, n, 0);
421 case RTE_RING_SYNC_MT_HTS:
422 n = __rte_ring_hts_get_tail(&r->hts_cons, &tail, n);
423 __rte_ring_hts_set_head_tail(&r->hts_cons, tail, n, 0);
426 case RTE_RING_SYNC_MT_RTS:
#define __rte_always_inline
static __rte_experimental __rte_always_inline unsigned int rte_ring_enqueue_burst_elem_start(struct rte_ring *r, unsigned int n, unsigned int *free_space)
static __rte_experimental __rte_always_inline void rte_ring_dequeue_elem_finish(struct rte_ring *r, unsigned int n)
static __rte_experimental __rte_always_inline unsigned int rte_ring_enqueue_bulk_elem_start(struct rte_ring *r, unsigned int n, unsigned int *free_space)
static __rte_experimental __rte_always_inline void rte_ring_enqueue_elem_finish(struct rte_ring *r, const void *obj_table, unsigned int esize, unsigned int n)
static __rte_experimental __rte_always_inline unsigned int rte_ring_dequeue_burst_start(struct rte_ring *r, void **obj_table, unsigned int n, unsigned int *available)
static __rte_experimental __rte_always_inline unsigned int rte_ring_dequeue_burst_elem_start(struct rte_ring *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available)
static __rte_experimental __rte_always_inline unsigned int rte_ring_dequeue_bulk_elem_start(struct rte_ring *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available)
static __rte_experimental __rte_always_inline void rte_ring_dequeue_finish(struct rte_ring *r, unsigned int n)
static __rte_experimental __rte_always_inline unsigned int rte_ring_dequeue_bulk_start(struct rte_ring *r, void **obj_table, unsigned int n, unsigned int *available)
enum rte_ring_sync_type sync_type
static __rte_experimental __rte_always_inline unsigned int rte_ring_enqueue_bulk_start(struct rte_ring *r, unsigned int n, unsigned int *free_space)
static __rte_experimental __rte_always_inline unsigned int rte_ring_enqueue_burst_start(struct rte_ring *r, unsigned int n, unsigned int *free_space)
static __rte_experimental __rte_always_inline void rte_ring_enqueue_finish(struct rte_ring *r, void *const *obj_table, unsigned int n)