* Return the number of used entries in a stack. * * @param s * A pointer to the stack structure. * @return * The number of used entries in the stack. */
| 150 | * The number of used entries in the stack. |
| 151 | */ |
| 152 | static __rte_always_inline unsigned int |
| 153 | rte_stack_count(struct rte_stack *s) |
| 154 | { |
| 155 | RTE_ASSERT(s != NULL); |
| 156 | |
| 157 | if (s->flags & RTE_STACK_F_LF) |
| 158 | return __rte_stack_lf_count(s); |
| 159 | else |
| 160 | return __rte_stack_std_count(s); |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Return the number of free entries in a stack. |