From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yipeng Wang Subject: [PATCH v4 1/5] test/hash: fix bucket size in hash perf test Date: Fri, 28 Sep 2018 07:11:05 -0700 Message-ID: <1538143869-152808-2-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> Cc: dev@dpdk.org, yipeng1.wang@intel.com, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com To: bruce.richardson@intel.com 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) In-Reply-To: <1538143869-152808-1-git-send-email-yipeng1.wang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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