5 #ifndef _RTE_STACK_LF_GENERIC_H_
6 #define _RTE_STACK_LF_GENERIC_H_
12 __rte_stack_lf_count(
struct rte_stack *s)
30 &s->stack_lf.used.len);
34 __rte_stack_lf_push_elems(
struct rte_stack_lf_list *list,
35 struct rte_stack_lf_elem *first,
36 struct rte_stack_lf_elem *last,
39 struct rte_stack_lf_head old_head;
42 old_head = list->head;
45 struct rte_stack_lf_head new_head;
58 new_head.cnt = old_head.cnt + 1;
60 last->next = old_head.top;
64 (rte_int128_t *)&list->head,
65 (rte_int128_t *)&old_head,
66 (rte_int128_t *)&new_head,
69 }
while (success == 0);
75 __rte_stack_lf_pop_elems(
struct rte_stack_lf_list *list,
78 struct rte_stack_lf_elem **last)
80 struct rte_stack_lf_head old_head;
96 old_head = list->head;
100 struct rte_stack_lf_head new_head;
101 struct rte_stack_lf_elem *tmp;
119 for (i = 0; i < num && tmp != NULL; i++) {
122 obj_table[i] = tmp->data;
135 new_head.cnt = old_head.cnt + 1;
139 (rte_int128_t *)&list->head,
140 (rte_int128_t *)&old_head,
141 (rte_int128_t *)&new_head,
144 }
while (success == 0);