[dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures from public API

Stephen Hemminger stephen at networkplumber.org
Fri Sep 6 19:24:15 CEST 2019


On Fri,  6 Sep 2019 15:18:11 +0200
Marcin Zapolski <marcinx.a.zapolski at intel.com> wrote:

> +RTE_INIT(rte_eth_dev_init)
> +{
> +	int i;
> +
> +	for (i = 0; i < RTE_MAX_ETHPORTS; i++)
> +		rte_eth_dev_functions[i] =
> +			(struct rte_eth_dev_fcns *)(&rte_eth_devices[i]);

Casts are error prone. Is it possible to use container_of instead of direct cast.


More information about the dev mailing list