From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 04:27:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="80358456" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga007.jf.intel.com with SMTP; 11 Oct 2018 04:27:38 -0700 Received: by (sSMTP sendmail emulation); Thu, 11 Oct 2018 12:27:37 +0100 Date: Thu, 11 Oct 2018 12:27:36 +0100 From: Bruce Richardson To: Yipeng Wang Cc: stephen@networkplumber.org, dev@dpdk.org, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com 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 Content-Disposition: inline In-Reply-To: <1539208085-30756-3-git-send-email-yipeng1.wang@intel.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v1 2/3] test/hash: change multiwriter test to use jhash 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: Thu, 11 Oct 2018 11:27:42 -0000 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