DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] About the LRU Cache based DPDK?
@ 2018-11-26  9:27 bai bakari
  2018-11-26 21:49 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 3+ messages in thread
From: bai bakari @ 2018-11-26  9:27 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] About the LRU Cache based DPDK?
  2018-11-26  9:27 [dpdk-dev] About the LRU Cache based DPDK? bai bakari
@ 2018-11-26 21:49 ` Dumitrescu, Cristian
  2018-11-27  3:15   ` bai bakari
  0 siblings, 1 reply; 3+ messages in thread
From: Dumitrescu, Cristian @ 2018-11-26 21:49 UTC (permalink / raw)
  To: bai bakari, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of bai bakari
> Sent: Monday, November 26, 2018 9:28 AM
> To: dev <dev@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] About the LRU Cache based DPDK?
  2018-11-26 21:49 ` Dumitrescu, Cristian
@ 2018-11-27  3:15   ` bai bakari
  0 siblings, 0 replies; 3+ messages in thread
From: bai bakari @ 2018-11-27  3:15 UTC (permalink / raw)
  To: Dumitrescu, Cristian; +Cc: dev

OK, thank you very much!


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

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





> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of bai bakari
> Sent: Monday, November 26, 2018 9:28 AM
> To: dev <dev@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-27  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26  9:27 [dpdk-dev] About the LRU Cache based DPDK? bai bakari
2018-11-26 21:49 ` Dumitrescu, Cristian
2018-11-27  3:15   ` bai bakari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).