[dpdk-dev] [PATCH v2 6/7] test/hash: implement extendable bucket hash test

Wang, Yipeng1 yipeng1.wang at intel.com
Sat Sep 29 02:50:48 CEST 2018



>-----Original Message-----
>From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli at arm.com]
>Sent: Wednesday, September 26, 2018 9:24 PM
>To: Wang, Yipeng1 <yipeng1.wang at intel.com>; Richardson, Bruce <bruce.richardson at intel.com>
>Cc: dev at dpdk.org; michel at digirati.com.br
>Subject: RE: [PATCH v2 6/7] test/hash: implement extendable bucket hash test
>
>>  RETURN_IF_ERROR(handle == NULL, "hash creation failed");
>>
>>  for (j = 0; j < ITERATIONS; j++) {
>My understanding is that when extendable table feature is enabled, we will add entries to the full capacity. Hence the
>rte_hash_count and rte_hash_reset should get tested in this test case.
>
[Wang, Yipeng] Currently both functions are already there in the loop right?
For V4, I've added another condition to double check if the count == param->entries.

>> @@ -1186,8 +1312,13 @@ static int test_hash_iteration(void)
>>  for (i = 0; i < ut_params.key_len; i++)
>>  keys[added_keys][i] = rte_rand() % 255;
>>  ret = rte_hash_add_key_data(handle, keys[added_keys],
>> data[added_keys]);
>> -if (ret < 0)
>> +if (ret < 0) {
>> +if (ext_table) {
>> +printf("Insertion failed for ext table\n");
>> +goto err;
>> +}
>>  break;
>> +}
>>  }
>>
>I suggest we add a call to rte_hash_count() to verify that configured maximum number of entries are added, will be a good corner test
>for rte_hash_count as well.
>
[Wang, Yipeng] Please check if the newly added logic in V4 addresses your concern. 



More information about the dev mailing list