From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 869EF1B570 for ; Mon, 26 Nov 2018 22:49:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2018 13:49:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,283,1539673200"; d="scan'208";a="88941989" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga007.fm.intel.com with ESMTP; 26 Nov 2018 13:49:43 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.101]) by IRSMSX153.ger.corp.intel.com ([169.254.9.139]) with mapi id 14.03.0415.000; Mon, 26 Nov 2018 21:49:43 +0000 From: "Dumitrescu, Cristian" To: bai bakari <912873551@qq.com>, dev Thread-Topic: [dpdk-dev] About the LRU Cache based DPDK? Thread-Index: AQHUhWpabJYccnkVtUyyq/8PzztQqKVh7mrg Date: Mon, 26 Nov 2018 21:49:42 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E800DCB@IRSMSX108.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODM1OGZmMTctYjI3YS00YTVlLWJhYWItYWU3MWI2OGRiMTRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC96Zng5c21GMzh6TE5TSzZqWDM4cEhZSU1EeFVMZjk4QkhtVVk3XC9OMGVsZXA4ZFVSNWlnNFc3RkdJYWJiS1NiIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] About the LRU Cache based DPDK? 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: Mon, 26 Nov 2018 21:49:46 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of bai bakari > Sent: Monday, November 26, 2018 9:28 AM > To: dev > Subject: [dpdk-dev] About the LRU Cache based DPDK? >=20 > Hi all, >=20 >=20 > I'm going to implement a LRU Cache based DPDK. > The most famous implementation of LRU is based on LinkedHashMap. > I know that DPDK has a `rte_hash` library, but I don't know whether > it can assist me to build a LRU Cache. >=20 >=20 > Can someone give me some advice? Thanks a lot in advance. Hai Bai, There are already several flavors of Least Recently Used (LRU) hash table i= mplemented in lib/librte_table. API: Search for LRU in lib/librte_table/rte_table_hash.h. =20 Implementations: * rte_table_hash.c: optimized for configurable size key * rte_table_hash_key8.c: optimized for 8-byte key * rte_table_hash_key16.c: optimized for 16-byte key * rte_table_hash_key32.c: optimized for 32-byte key Design documentation: http://doc.dpdk.org/guides/prog_guide/packet_framewor= k.html#hash-table-design Regards, Cristian