[RFC v3 1/3] eal/lcore: add topology based functions

Stephen Hemminger stephen at networkplumber.org
Wed Oct 30 16:47:59 CET 2024


On Wed, 30 Oct 2024 11:11:31 +0530
Vipin Varghese <vipin.varghese at amd.com> wrote:

> +struct topology_config {
> +#ifdef RTE_EAL_HWLOC_TOPOLOGY_PROBE
> +	hwloc_topology_t topology;
> +#endif
> +
> +	/* domain count */
> +	uint16_t l1_count;
> +	uint16_t l2_count;
> +	uint8_t l3_count;
> +	uint8_t io_count;
> +
> +	/* total cores under all domain */
> +	uint16_t l1_core_count;
> +	uint16_t l2_core_count;
> +	uint16_t l3_core_count;
> +	uint16_t io_core_count;
> +
> +	/* two dimensional array for each domain */
> +	struct core_domain_mapping **l1;
> +	struct core_domain_mapping **l2;
> +	struct core_domain_mapping **l3;
> +	struct core_domain_mapping **io;
> +};
> +extern struct topology_config topo_cnfg;
> +

To work with primary/secondary process model, it might be better to keep
this info in hugpage/shared memory. I.e put topology_config into space
allocated with rte_malloc() and populated by primary process.


More information about the dev mailing list