[PATCH v5 v5 1/3] eal/topology: add Topology grouping for lcores
Varghese, Vipin
Vipin.Varghese at amd.com
Wed Apr 15 19:52:15 CEST 2026
[AMD Official Use Only - AMD Internal Distribution Only]
Thank you @Morten Brørup
<snipped>
> >
> > +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
Thanks for the pointer, If I understand this correctly for given DPDK processing for `rte_lcore_count` is valid representation While hwloc_init can show upto 1024 or more. Hence step-1 identify the number of cores (or execution engines) per domain. Alloc for cpuset and use set for valid lcores.
I will make this change in v6 and omit rte_cpuset_t
More information about the dev
mailing list