| 769 | } |
| 770 | |
| 771 | int |
| 772 | rte_eth_switch_domain_alloc(uint16_t *domain_id) |
| 773 | { |
| 774 | uint16_t i; |
| 775 | |
| 776 | *domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID; |
| 777 | |
| 778 | for (i = 0; i < RTE_MAX_ETHPORTS; i++) { |
| 779 | if (eth_dev_switch_domains[i].state == |
| 780 | RTE_ETH_SWITCH_DOMAIN_UNUSED) { |
| 781 | eth_dev_switch_domains[i].state = |
| 782 | RTE_ETH_SWITCH_DOMAIN_ALLOCATED; |
| 783 | *domain_id = i; |
| 784 | return 0; |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | return -ENOSPC; |
| 789 | } |
| 790 | |
| 791 | int |
| 792 | rte_eth_switch_domain_free(uint16_t domain_id) |
no outgoing calls
no test coverage detected