[dpdk-dev] [PATCH v3 1/2] eal: add additional info if core list too long

David Hunt david.hunt at intel.com
Tue Sep 21 17:10:04 CEST 2021


On 21/9/2021 2:51 PM, David Marchand wrote:
> On Tue, Sep 21, 2021 at 1:50 PM David Hunt <david.hunt at intel.com> wrote:
>>   static int
>>   eal_parse_coremask(const char *coremask, int *cores)
>>   {
>> @@ -839,54 +880,89 @@ eal_parse_service_corelist(const char *corelist)
>>   static int
>>   eal_parse_corelist(const char *corelist, int *cores)
>>   {
>> -       unsigned count = 0;
>> +       unsigned int count = 0, k;
>>          char *end = NULL;
>>          int min, max;
>>          int idx;
>> +       int lcores[RTE_MAX_LCORE];
> Static array...
>
> "-l 0-RTE_MAX_LCORE" / "-c 0x1<enough f to fill RTE_MAX_LCORE>" / "-l
> 0-(RTE_MAX_LCORE-1),0" crash.
>
> Please set RTE_MAX_LCORE to 4 (or something that is smaller than your
> system core count) and run the tests I provided in my previous mail.
>
Hi David,

I did set the lcore_max to 4, and ran the tests you provided, and they 
all looked OK.

However, as you have pointed out, there is a problem with the lcores 
array, which I have now fixed, I'll push up shortly. I'm not expecting 
to populate with more than RTE_MAX_LCORE elements, but there was an edge 
case where one extra was being added.

Thanks again,
Dave.





More information about the dev mailing list