5 #ifndef _RTE_STACK_LF_H_
6 #define _RTE_STACK_LF_H_
8 #if !(defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_ARM64))
9 #include "rte_stack_lf_stubs.h"
11 #ifdef RTE_USE_C11_MEM_MODEL
12 #include "rte_stack_lf_c11.h"
14 #include "rte_stack_lf_generic.h"
31 __rte_stack_lf_push(
struct rte_stack *s,
32 void *
const *obj_table,
35 struct rte_stack_lf_elem *tmp, *first, *last = NULL;
42 first = __rte_stack_lf_pop_elems(&s->stack_lf.free, n, NULL, &last);
47 for (tmp = first, i = 0; i < n; i++, tmp = tmp->next)
48 tmp->data = obj_table[n - i - 1];
51 __rte_stack_lf_push_elems(&s->stack_lf.used, first, last, n);
69 __rte_stack_lf_pop(
struct rte_stack *s,
void **obj_table,
unsigned int n)
71 struct rte_stack_lf_elem *first, *last = NULL;
77 first = __rte_stack_lf_pop_elems(&s->stack_lf.used,
83 __rte_stack_lf_push_elems(&s->stack_lf.free, first, last, n);
97 rte_stack_lf_init(
struct rte_stack *s,
unsigned int count);
108 rte_stack_lf_get_memsize(
unsigned int count);
#define __rte_always_inline