| 715 | } |
| 716 | |
| 717 | struct rte_efd_table * |
| 718 | rte_efd_find_existing(const char *name) |
| 719 | { |
| 720 | struct rte_efd_table *table = NULL; |
| 721 | struct rte_tailq_entry *te; |
| 722 | struct rte_efd_list *efd_list; |
| 723 | |
| 724 | efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list); |
| 725 | |
| 726 | rte_mcfg_tailq_read_lock(); |
| 727 | |
| 728 | TAILQ_FOREACH(te, efd_list, next) |
| 729 | { |
| 730 | table = (struct rte_efd_table *) te->data; |
| 731 | if (strncmp(name, table->name, RTE_EFD_NAMESIZE) == 0) |
| 732 | break; |
| 733 | } |
| 734 | rte_mcfg_tailq_read_unlock(); |
| 735 | |
| 736 | if (te == NULL) { |
| 737 | rte_errno = ENOENT; |
| 738 | return NULL; |
| 739 | } |
| 740 | return table; |
| 741 | } |
| 742 | |
| 743 | void |
| 744 | rte_efd_free(struct rte_efd_table *table) |