| rte_stack.h(3) | Library Functions Manual | rte_stack.h(3) |
rte_stack.h
#include <stdalign.h>
#include <rte_debug.h>
#include <rte_errno.h>
#include <rte_memzone.h>
#include <rte_spinlock.h>
#include 'rte_stack_std.h'
#include 'rte_stack_lf.h'
#define RTE_STACK_NAMESIZE
#define RTE_STACK_F_LF 0x0001
static __rte_always_inline unsigned int
rte_stack_push (struct rte_stack *s, void *const *obj_table, unsigned
int n)
static __rte_always_inline unsigned int rte_stack_pop (struct
rte_stack *s, void **obj_table, unsigned int n)
static __rte_always_inline unsigned int rte_stack_count (struct
rte_stack *s)
static __rte_always_inline unsigned int rte_stack_free_count
(struct rte_stack *s)
struct rte_stack * rte_stack_create (const char *name, unsigned int
count, int socket_id, uint32_t flags)
void rte_stack_free (struct rte_stack *s)
struct rte_stack * rte_stack_lookup (const char *name)
RTE Stack.
librte_stack provides an API for configuration and use of a bounded stack of pointers. Push and pop operations are MT-safe, allowing concurrent access, and the interface supports pushing and popping multiple pointers at a time.
Definition in file rte_stack.h.
Value:.PP
(RTE_MEMZONE_NAMESIZE - \
sizeof(RTE_STACK_MZ_PREFIX) + 1)
The maximum length of a stack name.
Definition at line 28 of file rte_stack.h.
The stack uses lock-free push and pop functions. This flag is only supported on x86_64 or arm64 platforms, currently.
Definition at line 89 of file rte_stack.h.
Push several objects on the stack (MT-safe).
Parameters
Returns
Definition at line 111 of file rte_stack.h.
Pop several objects from the stack (MT-safe).
Parameters
Returns
Definition at line 135 of file rte_stack.h.
Return the number of used entries in a stack.
Parameters
Returns
Definition at line 155 of file rte_stack.h.
Return the number of free entries in a stack.
Parameters
Returns
Definition at line 174 of file rte_stack.h.
Create a new stack named name in memory.
This function uses memzone_reserve() to allocate memory for a stack of size count. The behavior of the stack is controlled by the flags.
Parameters
Returns
Free all memory used by the stack.
Parameters
Lookup a stack by its name.
Parameters
Returns
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |