[PATCH v2] examples/l3fwd: dynamic NUMA-aware alloc lcore_conf
fengchengwen
fengchengwen at huawei.com
Wed Jun 24 08:05:48 CEST 2026
On 6/24/2026 12:26 PM, Stephen Hemminger wrote:
> On Wed, 24 Jun 2026 11:23:57 +0800
> Chengwen Feng <fengchengwen at huawei.com> wrote:
>
>> -extern struct lcore_conf lcore_conf[RTE_MAX_LCORE];
>> +extern struct lcore_conf *lcore_conf[RTE_MAX_LCORE];
>>
>
> Since almost no systems have that many cores. Why not allocate it dynamically
> based on rte_lcore_count at runtime?
I understand that the original implementation did this for
simplicity (e.g., it can quickly index to the conf based on
lcore-id).
In my patch, I still keep the array, but the elements are
changed to pointers, and only elements corresponding to
actually valid lcores are allocated.
More information about the dev
mailing list