CNDP
22.08.0
|
Go to the source code of this file.
Functions | |
unsigned int | cne_ring_mp_enqueue_bulk (cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space) |
unsigned int | cne_ring_sp_enqueue_bulk (cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space) |
__cne_always_inline int | cne_ring_mp_enqueue (cne_ring_t *r, void *obj) |
__cne_always_inline int | cne_ring_sp_enqueue (cne_ring_t *r, void *obj) |
unsigned int | cne_ring_mc_dequeue_bulk (cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available) |
unsigned int | cne_ring_sc_dequeue_bulk (cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available) |
__cne_always_inline int | cne_ring_mc_dequeue (cne_ring_t *r, void **obj_p) |
__cne_always_inline int | cne_ring_sc_dequeue (cne_ring_t *r, void **obj_p) |
unsigned | cne_ring_mp_enqueue_burst (cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space) |
unsigned | cne_ring_sp_enqueue_burst (cne_ring_t *r, void *const *obj_table, unsigned int n, unsigned int *free_space) |
unsigned | cne_ring_mc_dequeue_burst (cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available) |
unsigned | cne_ring_sc_dequeue_burst (cne_ring_t *r, void **obj_table, unsigned int n, unsigned int *available) |
unsigned int | cne_ring_mp_enqueue_bulk_elem (cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) |
unsigned int | cne_ring_sp_enqueue_bulk_elem (cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) |
__cne_always_inline int | cne_ring_mp_enqueue_elem (cne_ring_t *r, void *obj, unsigned int esize) |
__cne_always_inline int | cne_ring_sp_enqueue_elem (cne_ring_t *r, void *obj, unsigned int esize) |
unsigned int | cne_ring_mc_dequeue_bulk_elem (cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available) |
unsigned int | cne_ring_sc_dequeue_bulk_elem (cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available) |
__cne_always_inline int | cne_ring_mc_dequeue_elem (cne_ring_t *r, void *obj_p, unsigned int esize) |
__cne_always_inline int | cne_ring_sc_dequeue_elem (cne_ring_t *r, void *obj_p, unsigned int esize) |
unsigned | cne_ring_mp_enqueue_burst_elem (cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) |
unsigned | cne_ring_sp_enqueue_burst_elem (cne_ring_t *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) |
unsigned | cne_ring_mc_dequeue_burst_elem (cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available) |
unsigned | cne_ring_sc_dequeue_burst_elem (cne_ring_t *r, void *obj_table, unsigned int esize, unsigned int n, unsigned int *available) |
CNDP Ring Internal API
Definition in file cne_ring_api_internal.h.
unsigned int cne_ring_mp_enqueue_bulk | ( | cne_ring_t * | r, |
void *const * | obj_table, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on the ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects). |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned int cne_ring_sp_enqueue_bulk | ( | cne_ring_t * | r, |
void *const * | obj_table, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on a ring (NOT multi-producers safe).
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects). |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
__cne_always_inline int cne_ring_mp_enqueue | ( | cne_ring_t * | r, |
void * | obj | ||
) |
Enqueue one object on a ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj | A pointer to the object to be added. |
Definition at line 80 of file cne_ring_api_internal.h.
__cne_always_inline int cne_ring_sp_enqueue | ( | cne_ring_t * | r, |
void * | obj | ||
) |
Enqueue one object on a ring (NOT multi-producers safe).
r | A pointer to the ring structure. |
obj | A pointer to the object to be added. |
Definition at line 97 of file cne_ring_api_internal.h.
unsigned int cne_ring_mc_dequeue_bulk | ( | cne_ring_t * | r, |
void ** | obj_table, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (multi-consumers safe).
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects) that will be filled. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
unsigned int cne_ring_sc_dequeue_bulk | ( | cne_ring_t * | r, |
void ** | obj_table, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (NOT multi-consumers safe).
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects) that will be filled. |
n | The number of objects to dequeue from the ring to the obj_table, must be strictly positive. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
__cne_always_inline int cne_ring_mc_dequeue | ( | cne_ring_t * | r, |
void ** | obj_p | ||
) |
Dequeue one object from a ring (multi-consumers safe).
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_p | A pointer to a void * pointer (object) that will be filled. |
Definition at line 158 of file cne_ring_api_internal.h.
__cne_always_inline int cne_ring_sc_dequeue | ( | cne_ring_t * | r, |
void ** | obj_p | ||
) |
Dequeue one object from a ring (NOT multi-consumers safe).
r | A pointer to the ring structure. |
obj_p | A pointer to a void * pointer (object) that will be filled. |
Definition at line 176 of file cne_ring_api_internal.h.
unsigned cne_ring_mp_enqueue_burst | ( | cne_ring_t * | r, |
void *const * | obj_table, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on the ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects). |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned cne_ring_sp_enqueue_burst | ( | cne_ring_t * | r, |
void *const * | obj_table, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on a ring (NOT multi-producers safe).
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects). |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned cne_ring_mc_dequeue_burst | ( | cne_ring_t * | r, |
void ** | obj_table, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (multi-consumers safe). When the request objects are more than the available objects, only dequeue the actual number of objects
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects) that will be filled. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
unsigned cne_ring_sc_dequeue_burst | ( | cne_ring_t * | r, |
void ** | obj_table, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (NOT multi-consumers safe).When the request objects are more than the available objects, only dequeue the actual number of objects
r | A pointer to the ring structure. |
obj_table | A pointer to a table of void * pointers (objects) that will be filled. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
unsigned int cne_ring_mp_enqueue_bulk_elem | ( | cne_ring_t * | r, |
const void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on the ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned int cne_ring_sp_enqueue_bulk_elem | ( | cne_ring_t * | r, |
const void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on a ring
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
__cne_always_inline int cne_ring_mp_enqueue_elem | ( | cne_ring_t * | r, |
void * | obj, | ||
unsigned int | esize | ||
) |
Enqueue one object on a ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj | A pointer to the object to be added. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
Definition at line 334 of file cne_ring_api_internal.h.
__cne_always_inline int cne_ring_sp_enqueue_elem | ( | cne_ring_t * | r, |
void * | obj, | ||
unsigned int | esize | ||
) |
Enqueue one object on a ring
r | A pointer to the ring structure. |
obj | A pointer to the object to be added. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
Definition at line 357 of file cne_ring_api_internal.h.
unsigned int cne_ring_mc_dequeue_bulk_elem | ( | cne_ring_t * | r, |
void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (multi-consumers safe).
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
unsigned int cne_ring_sc_dequeue_bulk_elem | ( | cne_ring_t * | r, |
void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (NOT multi-consumers safe).
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to dequeue from the ring to the obj_table, must be strictly positive. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
__cne_always_inline int cne_ring_mc_dequeue_elem | ( | cne_ring_t * | r, |
void * | obj_p, | ||
unsigned int | esize | ||
) |
Dequeue one object from a ring (multi-consumers safe).
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_p | A pointer to the object that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
Definition at line 430 of file cne_ring_api_internal.h.
__cne_always_inline int cne_ring_sc_dequeue_elem | ( | cne_ring_t * | r, |
void * | obj_p, | ||
unsigned int | esize | ||
) |
Dequeue one object from a ring (NOT multi-consumers safe).
r | A pointer to the ring structure. |
obj_p | A pointer to the object that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
Definition at line 452 of file cne_ring_api_internal.h.
unsigned cne_ring_mp_enqueue_burst_elem | ( | cne_ring_t * | r, |
const void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on the ring (multi-producers safe).
This function uses a "compare and set" instruction to move the producer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned cne_ring_sp_enqueue_burst_elem | ( | cne_ring_t * | r, |
const void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | free_space | ||
) |
Enqueue several objects on a ring
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to add in the ring from the obj_table. |
free_space | if non-NULL, returns the amount of space in the ring after the enqueue operation has finished. |
unsigned cne_ring_mc_dequeue_burst_elem | ( | cne_ring_t * | r, |
void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (multi-consumers safe). When the request objects are more than the available objects, only dequeue the actual number of objects
This function uses a "compare and set" instruction to move the consumer index atomically.
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |
unsigned cne_ring_sc_dequeue_burst_elem | ( | cne_ring_t * | r, |
void * | obj_table, | ||
unsigned int | esize, | ||
unsigned int | n, | ||
unsigned int * | available | ||
) |
Dequeue several objects from a ring (NOT multi-consumers safe).When the request objects are more than the available objects, only dequeue the actual number of objects
r | A pointer to the ring structure. |
obj_table | A pointer to a table of objects that will be filled. |
esize | The size of ring element, in bytes. It must be a multiple of 4. This must be the same value used while creating the ring. Otherwise the results are undefined. |
n | The number of objects to dequeue from the ring to the obj_table. |
available | If non-NULL, returns the number of remaining ring entries after the dequeue has finished. |