[dpdk-dev] About the LRU Cache based DPDK?

bai bakari 912873551 at qq.com
Tue Nov 27 04:15:23 CET 2018


OK, thank you very much!


------------------ Original ------------------
From:  "Dumitrescu, Cristian"<cristian.dumitrescu at intel.com>;
Date:  Tue, Nov 27, 2018 05:49 AM
To:  "bai bakari"<912873551 at qq.com>;"dev"<dev at dpdk.org>;

Subject:  RE: [dpdk-dev] About the LRU Cache based DPDK?





> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of bai bakari
> Sent: Monday, November 26, 2018 9:28 AM
> To: dev <dev at dpdk.org>
> Subject: [dpdk-dev] About the LRU Cache based DPDK?
> 
> Hi all,
> 
> 
> 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.
> 
> 
> 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 implemented in lib/librte_table.

API: Search for LRU in lib/librte_table/rte_table_hash.h.
 
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_framework.html#hash-table-design

Regards,
Cristian


More information about the dev mailing list