[PATCH v5 v5 1/3] eal/topology: add Topology grouping for lcores

Morten Brørup mb at smartsharesystems.com
Wed Apr 15 16:06:51 CEST 2026


> @@ -40,6 +45,63 @@ struct lcore_config {
> 
>  extern struct lcore_config lcore_config[RTE_MAX_LCORE];
> 
> +struct core_domain_mapping {
> +	rte_cpuset_t core_set;	/**< cpu_set representing lcores within
> domain */
> +	uint16_t core_count;	/**< dpdk enabled lcores within domain */
> +	uint16_t *cores;	/**< list of cores */
> +};

In Linux, rte_cpu_set_t is the same as cpu_set_t, which is limited to CPU_SETSIZE (1024) cores.

We should stop using that (fixed size) type, and use dynamically sized CPU sets instead.
Ref: https://man7.org/linux/man-pages/man3/CPU_SET.3.html

IMHO, both the fd_set type, limited to FDSET_SIZE (1024) file descriptors, and the cpu_set_t type, limited to CPU_SETSIZE (1024) cores, should be considered obsolete, and not used in new DPDK code.

It's hard to change old DPDK APIs relying on the fixed size rte_cpu_set_t type, but let's avoid adding new APIs using that (obsolete) type.

Also refer to: https://bugs.dpdk.org/show_bug.cgi?id=1704

PS: I guess a larger CPU_SETSIZE is available for systems built entirely from scratch, including libc and all libraries and applications. Not a generic solution.

-Morten



More information about the dev mailing list