> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Wednesday, September 26, 2018 3:19 PM
> To: dev@dpdk.org
> Cc: Marohn, Byron <byron.mar...@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.gua...@intel.com>; Pattan, Reshma
> <reshma.pat...@intel.com>; Parthasarathy, JananeeX M
> <jananeex.m.parthasara...@intel.com>
> Subject: [PATCH] test: reduce test duration for efd autotest
> 
> +     uint8_t simple_key;

Following to my comments in my earlier mail,
Can this be uint64_t simple-key; ? so that we can retain simple_key to be of 64 
bits as per original test case.

> efd_get_all_sockets_bitmask(),
> +                             sizeof(uint8_t),

sizeof(simple_key);

> +             val = mrand48() & VALUE_BITMASK;

Having value here can make all has key entries to have same value.
But as per original test case, they want to have different value for each
hash key entry. So better move val update inside for loop itself.

>               /* Add random entries until key cannot be added */
>               for (added_keys = 0; added_keys < num_rules_in;
> added_keys++) {
> 
> -                     for (i = 0; i < EFD_TEST_KEY_LEN; i++)
> -                             simple_key[i] = rte_rand() & 0xFF;
> +                     simple_key = rte_rand() & 0xFF;

If we agree to change simple_key to be of type unit64_t then masking with 0xFF 
will not be required here.

Instead of having val = mrand48() & VALUE_BITMASK;  as above. Now you can do 
val = simple_key & 0xFF;  

So for each key that is going to be updated we will have different value as per 
original test.

> 
> -                     efd_value_t val = simple_key[0];
> -
> -                     if (rte_efd_update(handle, test_socket_id,
> simple_key,
> +                     if (rte_efd_update(handle, test_socket_id,
> &simple_key,

Thanks,
Reshma

Reply via email to