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

Function acl_free_node

dpdk/lib/acl/acl_bld.c:183–213  ·  view source on GitHub ↗

* Dereference all nodes to which this node points */

Source from the content-addressed store, hash-verified

181 * Dereference all nodes to which this node points
182 */
183static void
184acl_free_node(struct acl_build_context *context,
185 struct rte_acl_node *node)
186{
187 uint32_t n;
188
189 if (node->prev != NULL)
190 node->prev->next = NULL;
191 for (n = 0; n < node->num_ptrs; n++)
192 acl_deref_ptr(context, node, n);
193
194 /* free mrt if this is a match node */
195 if (node->mrt != NULL) {
196 acl_build_free(context, sizeof(struct rte_acl_match_results),
197 node->mrt);
198 node->mrt = NULL;
199 }
200
201 /* free transitions to other nodes */
202 if (node->ptrs != NULL) {
203 acl_build_free(context,
204 node->max_ptrs * sizeof(struct rte_acl_ptr_set),
205 node->ptrs);
206 node->ptrs = NULL;
207 }
208
209 /* put it on the free list */
210 context->num_nodes--;
211 node->next = context->node_free_list;
212 context->node_free_list = node;
213}
214
215
216/*

Callers 3

acl_deref_ptrFunction · 0.85
acl_merge_trieFunction · 0.85
acl_build_triesFunction · 0.85

Calls 2

acl_deref_ptrFunction · 0.85
acl_build_freeFunction · 0.85

Tested by

no test coverage detected