From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D14755A33 for ; Fri, 22 May 2015 12:16:16 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 22 May 2015 03:16:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,474,1427785200"; d="scan'208";a="733641676" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 22 May 2015 03:16:14 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t4MAGDuI008098; Fri, 22 May 2015 11:16:13 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t4MAGDp4013075; Fri, 22 May 2015 11:16:13 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t4MAGDx4013071; Fri, 22 May 2015 11:16:13 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Fri, 22 May 2015 11:16:04 +0100 Message-Id: <1432289771-12799-4-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1432289771-12799-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1431428560-25426-1-git-send-email-pablo.de.lara.guarch@intel.com> <1432289771-12799-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH v5 03/10] test/hash: update key size range and initial values for testing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 10:16:17 -0000 Previous key sizes used for testing did not have much purpose. This patch substitutes them with some more meaninful (standard multiple of 2 key sizes, plus IPv4/v6 tuple and others) Also an arbitrary initial value has been added to increase the test coverage. Signed-off-by: Pablo de Lara --- app/test/test_hash_functions.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/test/test_hash_functions.c b/app/test/test_hash_functions.c index 767b2bc..973fbe8 100644 --- a/app/test/test_hash_functions.c +++ b/app/test/test_hash_functions.c @@ -57,8 +57,14 @@ #define HASHTEST_ITERATIONS 1000000 static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; -static uint32_t hashtest_initvals[] = {0}; -static uint32_t hashtest_key_lens[] = {2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, 31, 32, 33, 63, 64}; +static uint32_t hashtest_initvals[] = {0, 0xdeadbeef}; +static uint32_t hashtest_key_lens[] = { + 4, 8, 16, 32, 48, 64, /* standard key sizes */ + 9, /* IPv4 SRC + DST + protocol, unpadded */ + 13, /* IPv4 5-tuple, unpadded */ + 37, /* IPv6 5-tuple, unpadded */ + 40 /* IPv6 5-tuple, padded to 8-byte boundary */ +}; /******************************************************************************/ /* -- 1.7.4.1