DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test: reduce test duration for efd autotest
@ 2018-09-26 14:19 Jananee Parthasarathy
  2018-10-17 13:33 ` Pattan, Reshma
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jananee Parthasarathy @ 2018-09-26 14:19 UTC (permalink / raw)
  To: dev
  Cc: byron.marohn, pablo.de.lara.guarch, reshma.pattan, Jananee Parthasarathy

Reduced test time for efd_autotest.
Key length is updated, invoke times of random function is reduced.

Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
---
 test/test/test_efd.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/test/test/test_efd.c b/test/test/test_efd.c
index ced091aab..893a09c03 100644
--- a/test/test/test_efd.c
+++ b/test/test/test_efd.c
@@ -331,8 +331,9 @@ static int test_average_table_utilization(void)
 {
 	struct rte_efd_table *handle = NULL;
 	uint32_t num_rules_in = TABLE_SIZE;
-	uint8_t simple_key[EFD_TEST_KEY_LEN];
-	unsigned int i, j;
+	uint8_t simple_key;
+	unsigned int j;
+	efd_value_t val;
 	unsigned int added_keys, average_keys_added = 0;
 
 	printf("Evaluating table utilization and correctness, please wait\n");
@@ -340,7 +341,7 @@ static int test_average_table_utilization(void)
 
 	for (j = 0; j < ITERATIONS; j++) {
 		handle = rte_efd_create("test_efd", num_rules_in,
-				EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
+				sizeof(uint8_t), efd_get_all_sockets_bitmask(),
 				test_socket_id);
 		if (handle == NULL) {
 			printf("efd table creation failed\n");
@@ -350,18 +351,16 @@ static int test_average_table_utilization(void)
 		unsigned int succeeded = 0;
 		unsigned int lost_keys = 0;
 
+		val = mrand48() & VALUE_BITMASK;
 		/* 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;
 
-			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,
 						val))
 				break; /* continue;*/
-			if (rte_efd_lookup(handle, test_socket_id, simple_key)
+			if (rte_efd_lookup(handle, test_socket_id, &simple_key)
 					!= val)
 				lost_keys++;
 			else
-- 
2.13.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] test: reduce test duration for efd autotest
  2018-09-26 14:19 [dpdk-dev] [PATCH] test: reduce test duration for efd autotest Jananee Parthasarathy
@ 2018-10-17 13:33 ` Pattan, Reshma
  2018-10-17 14:34 ` Pattan, Reshma
  2018-10-31 14:30 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
  2 siblings, 0 replies; 9+ messages in thread
From: Pattan, Reshma @ 2018-10-17 13:33 UTC (permalink / raw)
  To: Parthasarathy, JananeeX M, dev; +Cc: Marohn, Byron, De Lara Guarch, Pablo



> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Wednesday, September 26, 2018 3:19 PM
> To: dev@dpdk.org
> 
>  	struct rte_efd_table *handle = NULL;
>  	uint32_t num_rules_in = TABLE_SIZE;
> -	uint8_t simple_key[EFD_TEST_KEY_LEN];

You need to remove EFD_TEST_KEY_LEN macro from the code now, as it is not is not used now.

Also seems like they want to use the key of length 8 bytes as per this test.
But after your changes we are going to have one byte key , so is the test behaving same before and after this key change?
 

> +		val = mrand48() & VALUE_BITMASK;

Can we use rte_rand() here instead of mrand48()? 
What was the reason for using mrand8()?

Thanks,
Reshma

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] test: reduce test duration for efd autotest
  2018-09-26 14:19 [dpdk-dev] [PATCH] test: reduce test duration for efd autotest Jananee Parthasarathy
  2018-10-17 13:33 ` Pattan, Reshma
@ 2018-10-17 14:34 ` Pattan, Reshma
  2018-10-31 14:30 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
  2 siblings, 0 replies; 9+ messages in thread
From: Pattan, Reshma @ 2018-10-17 14:34 UTC (permalink / raw)
  To: Parthasarathy, JananeeX M, dev; +Cc: Marohn, Byron, De Lara Guarch, Pablo



> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Wednesday, September 26, 2018 3:19 PM
> To: dev@dpdk.org
> Cc: Marohn, Byron <byron.marohn@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Pattan, Reshma
> <reshma.pattan@intel.com>; Parthasarathy, JananeeX M
> <jananeex.m.parthasarathy@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] test: reduce test duration for efd autotest
  2018-09-26 14:19 [dpdk-dev] [PATCH] test: reduce test duration for efd autotest Jananee Parthasarathy
  2018-10-17 13:33 ` Pattan, Reshma
  2018-10-17 14:34 ` Pattan, Reshma
@ 2018-10-31 14:30 ` Jananee Parthasarathy
  2018-10-31 16:11   ` Pattan, Reshma
  2018-11-29  7:36   ` [dpdk-dev] [PATCH v3] " Jananee Parthasarathy
  2 siblings, 2 replies; 9+ messages in thread
From: Jananee Parthasarathy @ 2018-10-31 14:30 UTC (permalink / raw)
  To: dev
  Cc: byron.marohn, pablo.de.lara.guarch, reshma.pattan, Jananee Parthasarathy

Reduced test time for efd_autotest.
Key length is updated, invoke times of random function is reduced.

Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
---
v2: value updated for each hash key
---
 test/test/test_efd.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/test/test/test_efd.c b/test/test/test_efd.c
index ced091aab..bf2c7b42a 100644
--- a/test/test/test_efd.c
+++ b/test/test/test_efd.c
@@ -331,8 +331,9 @@ static int test_average_table_utilization(void)
 {
 	struct rte_efd_table *handle = NULL;
 	uint32_t num_rules_in = TABLE_SIZE;
-	uint8_t simple_key[EFD_TEST_KEY_LEN];
-	unsigned int i, j;
+	uint64_t  simple_key;
+	unsigned int j;
+	efd_value_t val;
 	unsigned int added_keys, average_keys_added = 0;
 
 	printf("Evaluating table utilization and correctness, please wait\n");
@@ -340,7 +341,7 @@ static int test_average_table_utilization(void)
 
 	for (j = 0; j < ITERATIONS; j++) {
 		handle = rte_efd_create("test_efd", num_rules_in,
-				EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
+				sizeof(uint8_t), efd_get_all_sockets_bitmask(),
 				test_socket_id);
 		if (handle == NULL) {
 			printf("efd table creation failed\n");
@@ -353,15 +354,13 @@ static int test_average_table_utilization(void)
 		/* 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();
+			val = simple_key & 0xFF;
 
-			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,
 						val))
 				break; /* continue;*/
-			if (rte_efd_lookup(handle, test_socket_id, simple_key)
+			if (rte_efd_lookup(handle, test_socket_id, &simple_key)
 					!= val)
 				lost_keys++;
 			else
-- 
2.13.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] test: reduce test duration for efd autotest
  2018-10-31 14:30 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
@ 2018-10-31 16:11   ` Pattan, Reshma
  2018-11-29  7:36   ` [dpdk-dev] [PATCH v3] " Jananee Parthasarathy
  1 sibling, 0 replies; 9+ messages in thread
From: Pattan, Reshma @ 2018-10-31 16:11 UTC (permalink / raw)
  To: Parthasarathy, JananeeX M, dev; +Cc: Marohn, Byron, De Lara Guarch, Pablo

Hi,

-----Original Message-----
From: Parthasarathy, JananeeX M 
Sent: Wednesday, October 31, 2018 2:30 PM
To: dev@dpdk.org
Cc: Marohn, Byron <byron.marohn@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Pattan, Reshma <reshma.pattan@intel.com>; Parthasarathy, JananeeX M <jananeex.m.parthasarathy@intel.com>
Subject: [PATCH v2] test: reduce test duration for efd autotest

Reduced test time for efd_autotest.
Key length is updated, invoke times of random function is reduced.

Commit message should be changed a bit to reflect v2 changes.

 	for (j = 0; j < ITERATIONS; j++) {
 		handle = rte_efd_create("test_efd", num_rules_in,
-				EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
+				sizeof(uint8_t), efd_get_all_sockets_bitmask(),

sizeof(uint8_t) ==> sizeof(simple_key). Now simple key is of type uint64_t. 

Other than that. Please keep my ack in next version.

Acked-by: Reshma Pattan <reshma.pattan@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest
  2018-10-31 14:30 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
  2018-10-31 16:11   ` Pattan, Reshma
@ 2018-11-29  7:36   ` Jananee Parthasarathy
  2019-01-20 21:25     ` Thomas Monjalon
  1 sibling, 1 reply; 9+ messages in thread
From: Jananee Parthasarathy @ 2018-11-29  7:36 UTC (permalink / raw)
  To: dev
  Cc: byron.marohn, pablo.de.lara.guarch, reshma.pattan, Jananee Parthasarathy

Reduced test time for efd_autotest.
Key length is updated, invoke times of random function is reduced.
Different value is updated for each hash key entry.

Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
---
v3: reverted the simple_key to uint8_t type
v2: value updated for each hash key
---
 test/test/test_efd.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/test/test/test_efd.c b/test/test/test_efd.c
index ced091aab..94b490fdc 100644
--- a/test/test/test_efd.c
+++ b/test/test/test_efd.c
@@ -12,7 +12,6 @@
 
 #include "test.h"
 
-#define EFD_TEST_KEY_LEN 8
 #define TABLE_SIZE (1 << 21)
 #define ITERATIONS 3
 
@@ -331,8 +330,9 @@ static int test_average_table_utilization(void)
 {
 	struct rte_efd_table *handle = NULL;
 	uint32_t num_rules_in = TABLE_SIZE;
-	uint8_t simple_key[EFD_TEST_KEY_LEN];
-	unsigned int i, j;
+	uint8_t  simple_key;
+	unsigned int j;
+	efd_value_t val;
 	unsigned int added_keys, average_keys_added = 0;
 
 	printf("Evaluating table utilization and correctness, please wait\n");
@@ -340,7 +340,7 @@ static int test_average_table_utilization(void)
 
 	for (j = 0; j < ITERATIONS; j++) {
 		handle = rte_efd_create("test_efd", num_rules_in,
-				EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
+				sizeof(uint8_t), efd_get_all_sockets_bitmask(),
 				test_socket_id);
 		if (handle == NULL) {
 			printf("efd table creation failed\n");
@@ -353,15 +353,13 @@ static int test_average_table_utilization(void)
 		/* 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;
+			val = mrand48() & VALUE_BITMASK;
 
-			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,
 						val))
 				break; /* continue;*/
-			if (rte_efd_lookup(handle, test_socket_id, simple_key)
+			if (rte_efd_lookup(handle, test_socket_id, &simple_key)
 					!= val)
 				lost_keys++;
 			else
-- 
2.13.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest
  2018-11-29  7:36   ` [dpdk-dev] [PATCH v3] " Jananee Parthasarathy
@ 2019-01-20 21:25     ` Thomas Monjalon
  2019-07-04 21:46       ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2019-01-20 21:25 UTC (permalink / raw)
  To: dev
  Cc: Jananee Parthasarathy, byron.marohn, pablo.de.lara.guarch, reshma.pattan

Any review please?

29/11/2018 08:36, Jananee Parthasarathy:
> Reduced test time for efd_autotest.
> Key length is updated, invoke times of random function is reduced.
> Different value is updated for each hash key entry.
> 
> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
> ---
> v3: reverted the simple_key to uint8_t type
> v2: value updated for each hash key
> ---
>  test/test/test_efd.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/test/test/test_efd.c b/test/test/test_efd.c
> index ced091aab..94b490fdc 100644
> --- a/test/test/test_efd.c
> +++ b/test/test/test_efd.c
> @@ -12,7 +12,6 @@
>  
>  #include "test.h"
>  
> -#define EFD_TEST_KEY_LEN 8
>  #define TABLE_SIZE (1 << 21)
>  #define ITERATIONS 3
>  
> @@ -331,8 +330,9 @@ static int test_average_table_utilization(void)
>  {
>  	struct rte_efd_table *handle = NULL;
>  	uint32_t num_rules_in = TABLE_SIZE;
> -	uint8_t simple_key[EFD_TEST_KEY_LEN];
> -	unsigned int i, j;
> +	uint8_t  simple_key;
> +	unsigned int j;
> +	efd_value_t val;
>  	unsigned int added_keys, average_keys_added = 0;
>  
>  	printf("Evaluating table utilization and correctness, please wait\n");
> @@ -340,7 +340,7 @@ static int test_average_table_utilization(void)
>  
>  	for (j = 0; j < ITERATIONS; j++) {
>  		handle = rte_efd_create("test_efd", num_rules_in,
> -				EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
> +				sizeof(uint8_t), efd_get_all_sockets_bitmask(),
>  				test_socket_id);
>  		if (handle == NULL) {
>  			printf("efd table creation failed\n");
> @@ -353,15 +353,13 @@ static int test_average_table_utilization(void)
>  		/* 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;
> +			val = mrand48() & VALUE_BITMASK;
>  
> -			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,
>  						val))
>  				break; /* continue;*/
> -			if (rte_efd_lookup(handle, test_socket_id, simple_key)
> +			if (rte_efd_lookup(handle, test_socket_id, &simple_key)
>  					!= val)
>  				lost_keys++;
>  			else
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest
  2019-01-20 21:25     ` Thomas Monjalon
@ 2019-07-04 21:46       ` Thomas Monjalon
  2019-07-19  9:01         ` Parthasarathy, JananeeX M
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2019-07-04 21:46 UTC (permalink / raw)
  To: dev
  Cc: Jananee Parthasarathy, byron.marohn, pablo.de.lara.guarch,
	reshma.pattan, david.marchand, aconole

Still no review for this patch?

20/01/2019 22:25, Thomas Monjalon:
> Any review please?
> 
> 29/11/2018 08:36, Jananee Parthasarathy:
> > Reduced test time for efd_autotest.
> > Key length is updated, invoke times of random function is reduced.
> > Different value is updated for each hash key entry.
> > 
> > Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest
  2019-07-04 21:46       ` Thomas Monjalon
@ 2019-07-19  9:01         ` Parthasarathy, JananeeX M
  0 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy, JananeeX M @ 2019-07-19  9:01 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: Marohn, Byron, De Lara Guarch, Pablo, Pattan, Reshma,
	david.marchand, aconole

Hi,

>-----Original Message-----
>From: Thomas Monjalon [mailto:thomas@monjalon.net]
>Sent: Friday, July 05, 2019 3:17 AM
>To: dev@dpdk.org
>Cc: Parthasarathy, JananeeX M <jananeex.m.parthasarathy@intel.com>;
>Marohn, Byron <byron.marohn@intel.com>; De Lara Guarch, Pablo
><pablo.de.lara.guarch@intel.com>; Pattan, Reshma
><reshma.pattan@intel.com>; david.marchand@redhat.com;
>aconole@redhat.com
>Subject: Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest
>
>Still no review for this patch?
>
>20/01/2019 22:25, Thomas Monjalon:
>> Any review please?
>>
>> 29/11/2018 08:36, Jananee Parthasarathy:
>> > Reduced test time for efd_autotest.
>> > Key length is updated, invoke times of random function is reduced.
>> > Different value is updated for each hash key entry.
>> >
>> > Signed-off-by: Jananee Parthasarathy
><jananeex.m.parthasarathy@intel.com>
>
>
>
Self NACK.
Although this patch reduces test duration it reduces the number of combinations which is not useful.
Hence as per discussion with Maintainer, this patch can be ignored.

Regards
M.P.Jananee

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-19  9:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 14:19 [dpdk-dev] [PATCH] test: reduce test duration for efd autotest Jananee Parthasarathy
2018-10-17 13:33 ` Pattan, Reshma
2018-10-17 14:34 ` Pattan, Reshma
2018-10-31 14:30 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
2018-10-31 16:11   ` Pattan, Reshma
2018-11-29  7:36   ` [dpdk-dev] [PATCH v3] " Jananee Parthasarathy
2019-01-20 21:25     ` Thomas Monjalon
2019-07-04 21:46       ` Thomas Monjalon
2019-07-19  9:01         ` Parthasarathy, JananeeX M

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).