MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_stack_free

Function rte_stack_free

dpdk/lib/stack/rte_stack.c:131–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void
132rte_stack_free(struct rte_stack *s)
133{
134 struct rte_stack_list *stack_list;
135 struct rte_tailq_entry *te;
136
137 if (s == NULL)
138 return;
139
140 stack_list = RTE_TAILQ_CAST(rte_stack_tailq.head, rte_stack_list);
141 rte_mcfg_tailq_write_lock();
142
143 /* find out tailq entry */
144 TAILQ_FOREACH(te, stack_list, next) {
145 if (te->data == s)
146 break;
147 }
148
149 if (te == NULL) {
150 rte_mcfg_tailq_write_unlock();
151 return;
152 }
153
154 TAILQ_REMOVE(stack_list, te, next);
155
156 rte_mcfg_tailq_write_unlock();
157
158 rte_free(te);
159
160 rte_memzone_free(s->memzone);
161}
162
163struct rte_stack *
164rte_stack_lookup(const char *name)

Callers 6

stack_freeFunction · 0.85
__test_stack_perfFunction · 0.85
test_stack_basicFunction · 0.85
test_stack_name_reuseFunction · 0.85
test_free_nullFunction · 0.85
test_stack_multithreadedFunction · 0.85

Calls 4

rte_freeFunction · 0.85
rte_memzone_freeFunction · 0.85

Tested by 5

__test_stack_perfFunction · 0.68
test_stack_basicFunction · 0.68
test_stack_name_reuseFunction · 0.68
test_free_nullFunction · 0.68
test_stack_multithreadedFunction · 0.68