| 601 | } |
| 602 | |
| 603 | static void * |
| 604 | table_create(struct rte_swx_table_params *params, |
| 605 | struct rte_swx_table_entry_list *entries, |
| 606 | const char *args, |
| 607 | int numa_node) |
| 608 | { |
| 609 | struct table *t; |
| 610 | struct rte_swx_table_entry *entry; |
| 611 | int status; |
| 612 | |
| 613 | /* Table create. */ |
| 614 | status = __table_create(&t, NULL, params, args, numa_node); |
| 615 | if (status) |
| 616 | return NULL; |
| 617 | |
| 618 | /* Table add entries. */ |
| 619 | if (!entries) |
| 620 | return t; |
| 621 | |
| 622 | TAILQ_FOREACH(entry, entries, node) { |
| 623 | int status; |
| 624 | |
| 625 | status = table_add(t, entry); |
| 626 | if (status) { |
| 627 | table_free(t); |
| 628 | return NULL; |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | return t; |
| 633 | } |
| 634 | |
| 635 | static uint64_t |
| 636 | table_footprint(struct rte_swx_table_params *params, |
nothing calls this directly
no test coverage detected