[dpdk-dev] [PATCH v7 7/9] ethdev: add switch domain allocator

Thomas Monjalon thomas at monjalon.net
Tue Apr 24 21:58:43 CEST 2018


16/04/2018 15:06, Declan Doherty:
> +/**
> + * Array of switch domains available for allocation. Array is sized to
> + * RTE_MAX_ETHPORTS elements as there cannot be more active switch domains than
> + * ethdev ports in a single process.
> + */
> +struct rte_eth_dev_switch {
> +	enum rte_eth_switch_domain_state state;
> +} rte_eth_switch_domains[RTE_MAX_ETHPORTS];
[...]
> --- a/lib/librte_ether/rte_ethdev_version.map
> +++ b/lib/librte_ether/rte_ethdev_version.map
> @@ -236,5 +236,8 @@ EXPERIMENTAL {
>  	rt_eth_devargs_parse;
>  	rte_eth_dev_create;
>  	rte_eth_dev_destroy;
> +	rte_eth_switch_domain_alloc;
> +	rte_eth_switch_domain_free;
> +	rte_eth_switch_domains;

Why the table rte_eth_switch_domains is exported?
Can we use an iterator function + macro instead?




More information about the dev mailing list