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

Function acl_alloc_node

dpdk/lib/acl/acl_bld.c:156–178  ·  view source on GitHub ↗

* Allocate and initialize a new node. */

Source from the content-addressed store, hash-verified

154 * Allocate and initialize a new node.
155 */
156static struct rte_acl_node *
157acl_alloc_node(struct acl_build_context *context, int level)
158{
159 struct rte_acl_node *node;
160
161 if (context->node_free_list != NULL) {
162 node = context->node_free_list;
163 context->node_free_list = node->next;
164 memset(node, 0, sizeof(struct rte_acl_node));
165 } else {
166 node = acl_build_alloc(context, sizeof(struct rte_acl_node), 1);
167 }
168
169 if (node != NULL) {
170 node->num_ptrs = 0;
171 node->level = level;
172 node->node_type = RTE_ACL_NODE_UNDEFINED;
173 node->node_index = RTE_ACL_NODE_UNDEFINED;
174 context->num_nodes++;
175 node->id = context->node_id++;
176 }
177 return node;
178}
179
180/*
181 * Dereference all nodes to which this node points

Callers 8

acl_dup_nodeFunction · 0.85
acl_gen_full_rangeFunction · 0.85
acl_gen_range_mdlFunction · 0.85
acl_gen_range_lowFunction · 0.85
acl_gen_range_highFunction · 0.85
acl_gen_range_trieFunction · 0.85
acl_gen_mask_trieFunction · 0.85
build_trieFunction · 0.85

Calls 2

memsetFunction · 0.85
acl_build_allocFunction · 0.85

Tested by

no test coverage detected