From: Bruce Richardson Subject: Re: [PATCH v1 2/3] test/hash: change multiwriter test to use jhash Date: Thu, 11 Oct 2018 12:27:36 +0100 Message-ID: <20181011112736.GA22600@bricha3-MOBL.ger.corp.intel.com> References: <1539208085-30756-1-git-send-email-yipeng1.wang@intel.com> <1539208085-30756-3-git-send-email-yipeng1.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stephen@networkplumber.org, dev@dpdk.org, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com To: Yipeng Wang Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 229611B4B0 for ; Thu, 11 Oct 2018 13:27:41 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1539208085-30756-3-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" On Wed, Oct 10, 2018 at 02:48:04PM -0700, Yipeng Wang wrote: > With sequential key, the test will cover more corner > cases with jhash instead of crc hash, since jhash > generates more random hash pattern on sequential key. > It is useful for functional verification. > > Signed-off-by: Yipeng Wang > --- > test/test/test_hash_multiwriter.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > Looking at the code in the patch, it appears the function is always now called with use_jhash == 1. Why not just do a one-line change to switch the hard-coded crc hash to jhash, rather than hardcoding that later in the file and having a branch with a never-taken leg? /Bruce