27 #include <rte_compat.h>
33 #define RTE_TAILQ_STACK_NAME "RTE_STACK"
34 #define RTE_STACK_MZ_PREFIX "STK_"
36 #define RTE_STACK_NAMESIZE (RTE_MEMZONE_NAMESIZE - \
37 sizeof(RTE_STACK_MZ_PREFIX) + 1)
39 struct rte_stack_lf_elem {
41 struct rte_stack_lf_elem *next;
44 struct rte_stack_lf_head {
45 struct rte_stack_lf_elem *top;
49 struct rte_stack_lf_list {
71 struct rte_stack_std {
89 struct rte_stack_lf stack_lf;
90 struct rte_stack_std stack_std;
98 #define RTE_STACK_F_LF 0x0001
100 #include "rte_stack_std.h"
101 #include "rte_stack_lf.h"
122 RTE_ASSERT(s != NULL);
123 RTE_ASSERT(obj_table != NULL);
126 return __rte_stack_lf_push(s, obj_table, n);
128 return __rte_stack_std_push(s, obj_table, n);
150 RTE_ASSERT(s != NULL);
151 RTE_ASSERT(obj_table != NULL);
154 return __rte_stack_lf_pop(s, obj_table, n);
156 return __rte_stack_std_pop(s, obj_table, n);
174 RTE_ASSERT(s != NULL);
177 return __rte_stack_lf_count(s);
179 return __rte_stack_std_count(s);
197 RTE_ASSERT(s != NULL);
#define __rte_always_inline
__rte_experimental struct rte_stack * rte_stack_lookup(const char *name)
__rte_experimental void rte_stack_free(struct rte_stack *s)
static __rte_experimental __rte_always_inline unsigned int rte_stack_free_count(struct rte_stack *s)
static __rte_experimental __rte_always_inline unsigned int rte_stack_count(struct rte_stack *s)
static __rte_experimental __rte_always_inline unsigned int rte_stack_pop(struct rte_stack *s, void **obj_table, unsigned int n)
#define __rte_cache_aligned
__rte_experimental struct rte_stack * rte_stack_create(const char *name, unsigned int count, int socket_id, uint32_t flags)
#define RTE_STACK_NAMESIZE
static __rte_experimental __rte_always_inline unsigned int rte_stack_push(struct rte_stack *s, void *const *obj_table, unsigned int n)