| 303 | } |
| 304 | |
| 305 | struct rte_acl_ctx * |
| 306 | rte_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 | |
| 329 | void |
| 330 | rte_acl_free(struct rte_acl_ctx *ctx) |