From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx03a-out01ag.rit.edu (mx03a-out01ag.rit.edu [129.21.3.134]) by dpdk.org (Postfix) with ESMTP id 49ACD7D36 for ; Wed, 23 Aug 2017 22:20:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rit.edu; i=@rit.edu; q=dns/txt; s=rit1608; t=1503519658; x=1535055658; h=mime-version:in-reply-to:references:date:message-id: subject:to:cc:reply-to:from; bh=h5sCvlLQr4vbARU2S8X7r2VW8xxdvzTqcTglOUDaE58=; b=Wx83gjsmqxWsQSpvWdw0DpvPJlyzT1lecyYhU6MqPoQdk+awJdaC84bF Y8YYhMfgfFjpPyi8jmnLX/b2phj2AqIr9PyAmxZg+iZU7EXjZ9D1hnOqI 4i51b5IxehCx+F8BTs1M9m1PEQEfTMMzFcACmEUk/tZqgaAZens+2g/cw w=; From: Pragash Vijayaragavan X-IronPort-AV: E=Sophos;i="5.41,417,1498536000"; d="scan'208,217";a="141618010" Received: from mail-ua0-f197.google.com ([209.85.217.197]) by smtp-server.rit.edu with ESMTP/TLS/AES128-GCM-SHA256; 23 Aug 2017 16:20:57 -0400 Received: by mail-ua0-f197.google.com with SMTP id l47so780868uai.0 for ; Wed, 23 Aug 2017 13:20:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=h5sCvlLQr4vbARU2S8X7r2VW8xxdvzTqcTglOUDaE58=; b=hbLHGaJH83kEsI+vMwbljMgsLBT9c/JWGfv5h6nHPnuOKDM2C9DJg4Ct/TE9I8Vj4b ghxNLTS1wKJ5ycOnQZvQ79fXNI769yOadN45119ZgrcS6XiMMUbNhQj/RkX12L6ronEA F5442JFC+/FcAiyM9Mzf7HatPb2KubkFNTANICv4pi80PH+0LNhKS4M28ilawSyfHXv+ twvebVh8jL2oT6vQ9Ce9olmjeeCGBEhyZYFgt1/dV35dXY4ALDGYmMqRQJ7HpHbY/cEt pc89Y0Fpa+kWo1y5sA9pnhmrh1OaDGuKjf1L0BT29ELQHZQYk9WpuecL30HpGx1U6I66 moRA== X-Gm-Message-State: AHYfb5gsHqoNWyQsNEqL7GN0r9BYUpuMG6KqT9HyJ/9wtMC9JskPPTmk RumDCApJWtuuPk0iyaa1phTcDauRDuNsGbjIridqbx/qM+d4YVys1XNT17aAtLFYKhcMGodp4qi BZFadg+r/Ye3K7DIkH0vP X-Received: by 10.31.136.196 with SMTP id k187mr2508651vkd.85.1503519656114; Wed, 23 Aug 2017 13:20:56 -0700 (PDT) X-Received: by 10.31.136.196 with SMTP id k187mr2508644vkd.85.1503519655921; Wed, 23 Aug 2017 13:20:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.53.111 with HTTP; Wed, 23 Aug 2017 13:20:55 -0700 (PDT) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BA9E6FA@IRSMSX108.ger.corp.intel.com> References: <3EB4FA525960D640B5BDFFD6A3D891267BA9E6FA@IRSMSX108.ger.corp.intel.com> Date: Wed, 23 Aug 2017 16:20:55 -0400 Message-ID: To: "Dumitrescu, Cristian" Cc: "dev@dpdk.org" , Minseok Kwon Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] cuckoo hash in dpdk X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: pxv3620@rit.edu List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 20:20:58 -0000 Hi , The performance will depend on the time taken for calculating the hash1 and hash2 values for each lookup. Can i know which hash functions are used to calculate the hash values for each incoming key. We use CRC32 which uses xxhash i guess. I could not find the implementation of the hash functions. Thanks, Pragash Vijayaragavan Grad Student at Rochester Institute of Technology email : pxv3620@rit.edu ph : 585 764 4662 On Wed, Aug 23, 2017 at 2:28 PM, Dumitrescu, Cristian < cristian.dumitrescu@intel.com> wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pragash > > Vijayaragavan > > Sent: Wednesday, August 23, 2017 3:16 PM > > To: dev@dpdk.org > > Cc: Minseok Kwon > > Subject: [dpdk-dev] cuckoo hash in dpdk > > > > Hi, > > > > I got the chance to look at the cuckoo hash used in dpdk and have a > query. > > > > would using division and modulo operations be slower than bitwise > > operations on RTE_HASH_BUCKET_ENTRIES, specially since > > RTE_HASH_BUCKET_ENTRIES is a power of 2. > > For example, to do a modulo we can do a "AND" operation on > > (RTE_HASH_BUCKET_ENTRIES - 1), which might be faster. We did a cuckoo > > filter for VPP and doing this gave a slight improvement in speed. > > Is there any particular reason its done this way. > > > > Sorry if i am being wrong in any way, i was just curious. > > > > Thanks, > > > > Pragash Vijayaragavan > > Grad Student at Rochester Institute of Technology > > email : pxv3620@rit.edu > > ph : 585 764 4662 > > Bitwise AND typically takes 1 cycle on any CPU, while modulo takes dozens > of cycles. >