From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 309FF324D for ; Sun, 20 Jan 2019 22:25:31 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BF19221C47; Sun, 20 Jan 2019 16:25:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 20 Jan 2019 16:25:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=mduD2a+bTv/XxAHdhtREP7T73kiVkimvRuuVIFTMsBM=; b=acM1kgl/QF/1 0Nccg715+jReIgCFxT13yBZunGNm6Gjo3wM53eA4E9vEMIEyUkYhtA71wRGn3ZZV MUqp2pIIef0eJdNd5MMXDmRYbvsexbu04RptfXW3Wka9DD/5ljQbSKgqfpvN6I9L YQRPLL1DddPTbxLxf8IT5KWblyrPmwc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=mduD2a+bTv/XxAHdhtREP7T73kiVkimvRuuVIFTMs BM=; b=n2mFKxKfZ7eXulC0G1EADMtjaAF3a6CcmAvmK5Wgfa0BmbOyUTAhYhmZq ZtrTfd3cs6Xg+/ZsAa1TQuD/1peeRyyg/iQ7PcsB3owjzFo872TLh1QnmNSzoRCm ueYWj1QjG7q6UW4swUeEzeEHMHgXiFdYULuQQaNwmpuZ9OyNWyiQAh34fX25WWlP ziiG63/DCBCv/M4SQKpG2L2b6dI8wK+qPPmJcnvww4QZVVVAl5nYzamUg2Xg5vdu JXp2QHa0uqlvOamV3eBeR2cIoNXwsTmvzCjzKjiNdxU6vI53ph3W0siiNd32p0MW UhAEl1CAAFTXFeREw4zH4SLVy49zA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheeggdduhedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C485E4100; Sun, 20 Jan 2019 16:25:29 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Jananee Parthasarathy , byron.marohn@intel.com, pablo.de.lara.guarch@intel.com, reshma.pattan@intel.com Date: Sun, 20 Jan 2019 22:25:27 +0100 Message-ID: <3322984.ekidMcbYZi@xps> In-Reply-To: <1543476964-20344-1-git-send-email-jananeex.m.parthasarathy@intel.com> References: <1540996216-28812-1-git-send-email-jananeex.m.parthasarathy@intel.com> <1543476964-20344-1-git-send-email-jananeex.m.parthasarathy@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2019 21:25:31 -0000 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 > --- > 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 >