From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B7FBE1B3B0 for ; Fri, 28 Sep 2018 23:17:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Sep 2018 14:17:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,316,1534834800"; d="scan'208";a="266882881" Received: from skx-yipeng.jf.intel.com ([10.54.81.175]) by fmsmga005.fm.intel.com with ESMTP; 28 Sep 2018 14:16:08 -0700 From: Yipeng Wang To: bruce.richardson@intel.com Cc: dev@dpdk.org, yipeng1.wang@intel.com, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com Date: Fri, 28 Sep 2018 07:11:05 -0700 Message-Id: <1538143869-152808-2-git-send-email-yipeng1.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538143869-152808-1-git-send-email-yipeng1.wang@intel.com> References: <1537966465-248530-1-git-send-email-yipeng1.wang@intel.com> <1538143869-152808-1-git-send-email-yipeng1.wang@intel.com> Subject: [dpdk-dev] [PATCH v4 1/5] test/hash: fix bucket size in hash perf test 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: Fri, 28 Sep 2018 21:17:54 -0000 The bucket size was changed from 4 to 8 but the corresponding perf test was not changed accordingly. In the test, the bucket size and number of buckets are used to map to the underneath rte_hash structure. They are used to test performance of two conditions: keys in primary buckets only and keys in both primary and secondary buckets. Although there is no functional issue with bucket size set to 4, it mismatches the underneath rte_hash structure, which may affect code readability and future extension. Fixes: 58017c98ed53 ("hash: add vectorized comparison") Cc: stable@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 33dcb9f..fe11632 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_hash_perf.c @@ -20,7 +20,8 @@ #define MAX_ENTRIES (1 << 19) #define KEYS_TO_ADD (MAX_ENTRIES * 3 / 4) /* 75% table utilization */ #define NUM_LOOKUPS (KEYS_TO_ADD * 5) /* Loop among keys added, several times */ -#define BUCKET_SIZE 4 +/* BUCKET_SIZE should be same as RTE_HASH_BUCKET_ENTRIES in rte_hash library */ +#define BUCKET_SIZE 8 #define NUM_BUCKETS (MAX_ENTRIES / BUCKET_SIZE) #define MAX_KEYSIZE 64 #define NUM_KEYSIZES 10 -- 2.7.4