23 #include <rte_compat.h>
29 #define RTE_TAILQ_STACK_NAME "RTE_STACK"
30 #define RTE_STACK_MZ_PREFIX "STK_"
32 #define RTE_STACK_NAMESIZE (RTE_MEMZONE_NAMESIZE - \
33 sizeof(RTE_STACK_MZ_PREFIX) + 1)
35 struct rte_stack_lf_elem {
37 struct rte_stack_lf_elem *next;
40 struct rte_stack_lf_head {
41 struct rte_stack_lf_elem *top;
45 struct rte_stack_lf_list {
67 struct rte_stack_std {
85 struct rte_stack_lf stack_lf;
86 struct rte_stack_std stack_std;
94 #define RTE_STACK_F_LF 0x0001
96 #include "rte_stack_std.h"
97 #include "rte_stack_lf.h"
114 RTE_ASSERT(s != NULL);
115 RTE_ASSERT(obj_table != NULL);
118 return __rte_stack_lf_push(s, obj_table, n);
120 return __rte_stack_std_push(s, obj_table, n);
138 RTE_ASSERT(s != NULL);
139 RTE_ASSERT(obj_table != NULL);
142 return __rte_stack_lf_pop(s, obj_table, n);
144 return __rte_stack_std_pop(s, obj_table, n);
158 RTE_ASSERT(s != NULL);
161 return __rte_stack_lf_count(s);
163 return __rte_stack_std_count(s);
177 RTE_ASSERT(s != NULL);
void rte_stack_free(struct rte_stack *s)
#define __rte_always_inline
struct rte_stack * rte_stack_lookup(const char *name)
static __rte_always_inline unsigned int rte_stack_count(struct rte_stack *s)
struct rte_stack * rte_stack_create(const char *name, unsigned int count, int socket_id, uint32_t flags)
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_free_count(struct rte_stack *s)
#define __rte_cache_aligned
static __rte_always_inline unsigned int rte_stack_pop(struct rte_stack *s, void **obj_table, unsigned int n)
#define RTE_STACK_NAMESIZE