DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
To: dev@dpdk.org
Cc: byron.marohn@intel.com, pablo.de.lara.guarch@intel.com,
	reshma.pattan@intel.com,
	Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
Subject: [dpdk-dev] [PATCH] test: reduce test duration for efd autotest
Date: Wed, 26 Sep 2018 15:19:00 +0100	[thread overview]
Message-ID: <1537971540-31443-1-git-send-email-jananeex.m.parthasarathy@intel.com> (raw)

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

             reply	other threads:[~2018-09-26 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 14:19 Jananee Parthasarathy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537971540-31443-1-git-send-email-jananeex.m.parthasarathy@intel.com \
    --to=jananeex.m.parthasarathy@intel.com \
    --cc=byron.marohn@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).