10 #ifndef _CNE_RING_API_H_
11 #define _CNE_RING_API_H_
47 typedef void cne_ring_t;
49 #define RING_F_SP_ENQ 0x0001
50 #define RING_F_SC_DEQ 0x0002
51 #define RING_F_ALLOCATED 0x8000
61 #define RING_F_EXACT_SZ 0x0004
62 #define CNE_RING_SZ_MASK (0x7fffffffU)
130 CNDP_API cne_ring_t *
cne_ring_create(
const char *name,
unsigned int esize,
unsigned count,
169 CNDP_API cne_ring_t *
cne_ring_init(
void *addr, ssize_t size,
const char *name,
unsigned int esize,
170 unsigned int count,
unsigned int flags);
350 unsigned int *free_space);
393 unsigned int *available);
437 unsigned int *free_space);
459 unsigned int *available);
489 unsigned int esize,
unsigned int n,
490 unsigned int *free_space);
541 unsigned int n,
unsigned int *available);
593 unsigned int esize,
unsigned int n,
594 unsigned int *free_space);
620 unsigned int esize,
unsigned int n,
621 unsigned int *available);
#define __cne_always_inline
CNDP_API uint32_t cne_ring_get_prod_head(const cne_ring_t *r)
CNDP_API unsigned int cne_ring_dequeue_bulk(cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available)
CNDP_API int cne_ring_full(const cne_ring_t *r)
CNDP_API unsigned cne_ring_enqueue_burst_elem(cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space)
CNDP_API const char * cne_ring_get_name(const cne_ring_t *r)
CNDP_API cne_ring_t * cne_ring_create(const char *name, unsigned int esize, unsigned count, unsigned flags)
__cne_always_inline int cne_ring_enqueue(cne_ring_t *r, void *obj)
CNDP_API unsigned cne_ring_count(const cne_ring_t *r)
CNDP_API void cne_ring_dump(FILE *f, cne_ring_t *r)
CNDP_API uint32_t cne_ring_get_prod_tail(const cne_ring_t *r)
CNDP_API unsigned cne_ring_enqueue_burst(cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space)
CNDP_API ssize_t cne_ring_get_memsize_elem(unsigned int esize, unsigned int count)
CNDP_API uint32_t cne_ring_get_cons_head(const cne_ring_t *r)
CNDP_API unsigned cne_ring_get_capacity(const cne_ring_t *r)
CNDP_API void cne_ring_reset(cne_ring_t *r)
CNDP_API int cne_ring_get_flags(const cne_ring_t *r)
CNDP_API unsigned cne_ring_get_size(const cne_ring_t *r)
CNDP_API __cne_always_inline int cne_ring_dequeue(cne_ring_t *r, void **obj_p)
CNDP_API uint32_t cne_ring_get_cons_tail(const cne_ring_t *r)
CNDP_API unsigned cne_ring_dequeue_burst(cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available)
CNDP_API unsigned int cne_ring_dequeue_burst_elem(cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available)
CNDP_API unsigned int cne_ring_enqueue_bulk(cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space)
CNDP_API uint32_t cne_ring_get_mask(const cne_ring_t *r)
CNDP_API ssize_t cne_ring_get_memsize(unsigned count)
CNDP_API unsigned int cne_ring_enqueue_bulk_elem(cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space)
CNDP_API __cne_always_inline int cne_ring_dequeue_elem(cne_ring_t *r, void *obj_p, unsigned int esize)
CNDP_API __cne_always_inline int cne_ring_enqueue_elem(cne_ring_t *r, void *obj, unsigned int esize)
CNDP_API cne_ring_t * cne_ring_init(void *addr, ssize_t size, const char *name, unsigned int esize, unsigned int count, unsigned int flags)
CNDP_API void cne_ring_free(cne_ring_t *r)
CNDP_API unsigned cne_ring_free_count(const cne_ring_t *r)
CNDP_API unsigned int cne_ring_dequeue_bulk_elem(cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available)
CNDP_API int cne_ring_empty(const cne_ring_t *r)