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

Function rte_acl_find_existing

dpdk/lib/acl/rte_acl.c:305–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305struct rte_acl_ctx *
306rte_acl_find_existing(const char *name)
307{
308 struct rte_acl_ctx *ctx = NULL;
309 struct rte_acl_list *acl_list;
310 struct rte_tailq_entry *te;
311
312 acl_list = RTE_TAILQ_CAST(rte_acl_tailq.head, rte_acl_list);
313
314 rte_mcfg_tailq_read_lock();
315 TAILQ_FOREACH(te, acl_list, next) {
316 ctx = (struct rte_acl_ctx *) te->data;
317 if (strncmp(name, ctx->name, sizeof(ctx->name)) == 0)
318 break;
319 }
320 rte_mcfg_tailq_read_unlock();
321
322 if (te == NULL) {
323 rte_errno = ENOENT;
324 return NULL;
325 }
326 return ctx;
327}
328
329void
330rte_acl_free(struct rte_acl_ctx *ctx)

Callers 2

test_create_find_addFunction · 0.85
test_invalid_parametersFunction · 0.85

Calls 3

rte_mcfg_tailq_read_lockFunction · 0.85
strncmpFunction · 0.85

Tested by 2

test_create_find_addFunction · 0.68
test_invalid_parametersFunction · 0.68