[RFC PATCH v2 3/7] app/test-fib: fix size of the tables for large counts

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Thu Oct 15 16:21:32 CEST 2026


Hi Stephen,

On 10/14/2026 11:52 PM, Stephen Hemminger wrote:
> On Wed, 14 Oct 2026 18:39:17 +0000
> Vladimir Medvedkin <vladimir.medvedkin at intel.com> wrote:
>
>> diff --git a/app/test-fib/main.c b/app/test-fib/main.c
>> index d85d94fdd1..0bc8dd2aa4 100644
>> --- a/app/test-fib/main.c
>> +++ b/app/test-fib/main.c
>> @@ -1260,12 +1260,12 @@ main(int argc, char **argv)
>>   			BURST_SZ);
>>   
>>   	/* Alloc routes table*/
>> -	config.rt  = rte_malloc(NULL, rt_ent_sz * config.nb_routes, 0);
>> +	config.rt  = rte_malloc(NULL, (size_t)rt_ent_sz * config.nb_routes, 0);
>>   	if (config.rt == NULL)
>>   		rte_exit(-ENOMEM, "Can not alloc rt\n");
>>   
>>   	/* Alloc table with ip's for lookup*/
>> -	config.lookup_tbl  = rte_malloc(NULL, lookup_ent_sz *
>> +	config.lookup_tbl  = rte_malloc(NULL, (size_t)lookup_ent_sz *
>>   		config.nb_lookup_ips, 0);
> if you are going to change these, then fix a couple related things.
>    - comments have bad spacing in there
>    - use rte_calloc() for arrays
will change
>    - not sure why rte_malloc is used at all, this is test code. Doesn't need to be hugepages.
disagree. This array contains hundred millions of IP addresses and 
occupies hundreds Mb. Also this array is used in performance benchmark. 
I don't want to hit DTLB misses in performance tests.

-- 
Regards,
Vladimir



More information about the dev mailing list