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

Function rte_acl_free

dpdk/lib/acl/rte_acl.c:329–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void
330rte_acl_free(struct rte_acl_ctx *ctx)
331{
332 struct rte_acl_list *acl_list;
333 struct rte_tailq_entry *te;
334
335 if (ctx == NULL)
336 return;
337
338 acl_list = RTE_TAILQ_CAST(rte_acl_tailq.head, rte_acl_list);
339
340 rte_mcfg_tailq_write_lock();
341
342 /* find our tailq entry */
343 TAILQ_FOREACH(te, acl_list, next) {
344 if (te->data == (void *) ctx)
345 break;
346 }
347 if (te == NULL) {
348 rte_mcfg_tailq_write_unlock();
349 return;
350 }
351
352 TAILQ_REMOVE(acl_list, te, next);
353
354 rte_mcfg_tailq_write_unlock();
355
356 rte_free(ctx->mem);
357 rte_free(ctx);
358 rte_free(te);
359}
360
361struct rte_acl_ctx *
362rte_acl_create(const struct rte_acl_param *param)

Callers 15

acl_table_createFunction · 0.85
table_freeFunction · 0.85
rte_table_acl_freeFunction · 0.85
rte_table_acl_buildFunction · 0.85
rte_table_acl_entry_addFunction · 0.85
test_classifyFunction · 0.85
test_build_ports_rangeFunction · 0.85
test_convert_rulesFunction · 0.85
test_invalid_layoutFunction · 0.85

Calls 3

rte_freeFunction · 0.85

Tested by 9

test_classifyFunction · 0.68
test_build_ports_rangeFunction · 0.68
test_convert_rulesFunction · 0.68
test_invalid_layoutFunction · 0.68
test_create_find_addFunction · 0.68
test_invalid_rulesFunction · 0.68
test_invalid_parametersFunction · 0.68
test_miscFunction · 0.68
test_u32_rangeFunction · 0.68