From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by dpdk.org (Postfix) with ESMTP id B9EFC2C8 for ; Wed, 5 Jul 2017 05:38:10 +0200 (CEST) Received: by mail-yw0-f174.google.com with SMTP id l21so79163636ywb.1 for ; Tue, 04 Jul 2017 20:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fMWt+NnsNvugVWxMxdgej55bP+a1UHvUBHHOLsl9DIY=; b=KxPVPa54mBp7a0DtQ44ODLtzPQdU3ltKIftmtXbIbf96A6A4issAAIwdrIZSC3ostP poVI1eh5+nzo0HYowHaAkowUb/L1A/YEOiCAWEsfmqyJOrrP9FzJwEVBE+L6Lju+6Ns0 fFQUvBf3Gtf5TkNMeElmyRRjoi9pdI4d57BjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fMWt+NnsNvugVWxMxdgej55bP+a1UHvUBHHOLsl9DIY=; b=bxk71GoryeiZZF3cO2tUVi20VFDZxRK2pHM1p/BSDXw5PSMIIndnomQKutSFMX+pj3 tBJjG3vul8eORQw525eH9Ucz9duu3Oi8L0bCJPqVjF9N8vCrCWdBAfO9yDynFGkI1FYY FEDpzhuZD11TexF6OJ3QP9kSv+OO2wyiU94xIOLObzHqpHcva40XcacgpPxG1dqwviZk gzS91z8lPCB0kSBaIEoW8F+Hw2+vR2cu4lcICUEIfEw+h8+XpCEs3nQHmGGLuVkZQ8u3 dKHHPNwXrGkUziMlsqoCYJykilD1wpjGv3bXLZyXc3JNHUUHeWwB1hZNT/crRaq68a9A 4QCA== X-Gm-Message-State: AIVw111uoVCUqDu9s4rNyDcAGfKEw1qtqeqdPYEvEGloNxnEf8Nm43bP 16Bpp999P7+F2Q4IHyw6AGnKzhXMLVoo X-Received: by 10.13.245.65 with SMTP id e62mr14241090ywf.114.1499225890054; Tue, 04 Jul 2017 20:38:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.171.73 with HTTP; Tue, 4 Jul 2017 20:38:09 -0700 (PDT) In-Reply-To: References: <1495098540-8303-1-git-send-email-jianbo.liu@linaro.org> <4804120.hkK0KHU9aJ@xps> <3EB4FA525960D640B5BDFFD6A3D891267BA77E6C@IRSMSX108.ger.corp.intel.com> <1851401.bCM4vaXCYT@xps> From: Jianbo Liu Date: Wed, 5 Jul 2017 11:38:09 +0800 Message-ID: To: "De Lara Guarch, Pablo" Cc: Thomas Monjalon , "Dumitrescu, Cristian" , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "ashwin.sekhar@caviumnetworks.com" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: use crc32 in hash functions for arm64 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: Wed, 05 Jul 2017 03:38:11 -0000 On 4 July 2017 at 21:55, De Lara Guarch, Pablo wrote: > > >> -----Original Message----- >> From: Thomas Monjalon [mailto:thomas@monjalon.net] >> Sent: Tuesday, July 4, 2017 12:26 AM >> To: Dumitrescu, Cristian ; De Lara Guarch, >> Pablo >> Cc: dev@dpdk.org; Jianbo Liu ; >> jerin.jacob@caviumnetworks.com; ashwin.sekhar@caviumnetworks.com >> Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: use crc32 in hash >> functions for arm64 >> >> 04/07/2017 01:19, Dumitrescu, Cristian: >> > From: Thomas Monjalon [mailto:thomas@monjalon.net] >> > > 18/05/2017 11:09, Jianbo Liu: >> > > > Implement the same hash functions with crc32 on arm platform. >> > > > >> > > > Signed-off-by: Jianbo Liu >> > > > --- >> > > > examples/ip_pipeline/pipeline/hash_func.h | 2 + >> > > > examples/ip_pipeline/pipeline/hash_func_arm64.h | 245 >> > > ++++++++++++++++++++++++ >> > > > 2 files changed, 247 insertions(+) create mode 100644 >> > > > examples/ip_pipeline/pipeline/hash_func_arm64.h >> > > >> > > I don't understand why this code is in an example. >> > > We have some CRC code in librte_hash, librte_net and ip_pipeline. >> > > Cristian, Jianbo, >> > > does it make sense to move these functions somewhere else? >> > > >> > >> > I think example apps are a great way to propose new hash functions. >> > IMO we should encourage the definition/exploration of new hash >> functions in our example apps. >> > >> > These functions are examples of how fast hash functions can be built >> using special CPU instructions. >> > They have much better performance than e.g. jhash, but their >> > properties are largely unknown, as no rigorous study on their >> > properties (such as uniform distribution) has been conducted. I have >> > seen them providing good performance for the data set I have been >> using, but I have no extensive data to support their maturity level. >> > >> > If somebody is willing to invest the effort in proving them, I would >> > be more than happy to see them moved to a library like librte_hash. >> > Pablo as maintainer has the choice (I think it is not the first time >> > we discuss bout these hash funcs :) ) >> > >> > As mentioned in one of our deprecation notices, I am actively working >> > (not ready for 17.8 unfortunately) to add a key mask parameter to these >> functions, so more work on these hash functions is likely to take place. >> >> OK thanks for the explanation. >> I still think we do not need to prove hash for integrating them. >> I would be interested to read Pablo's opinion. > > If these functions are used as hash functions, I would place them in rte_hash. > > The case where we placed the CRC function in librte_net was because that > was not used as a hash function, so it made sense to me placing it there, > but in this case, it looks like it is, so I think rte_hash is a valid place > (although someone would need to integrate it with the existing CRC hash function in that library). > I think Cristian explanation justified using the special hash functions here. And they may have better performance than the standard functions in the library. Thanks! Jianbo