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

Function rte_eth_switch_domain_alloc

dpdk/lib/ethdev/ethdev_driver.c:771–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771int
772rte_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
791int
792rte_eth_switch_domain_free(uint16_t domain_id)

Callers 11

ipn3ke_hw_initFunction · 0.85
ngbe_pf_host_initFunction · 0.85
nfp_flower_repr_createFunction · 0.85
ixgbe_pf_host_initFunction · 0.85
mlx5_dev_spawnFunction · 0.85
mlx5_dev_spawnFunction · 0.85
txgbe_pf_host_initFunction · 0.85
bnxt_alloc_switch_domainFunction · 0.85
i40e_pf_setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected