DPDK patches and discussions
 help / color / mirror / Atom feed
From: "bai bakari" <912873551@qq.com>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] About the LRU Cache based DPDK?
Date: Tue, 27 Nov 2018 11:15:23 +0800	[thread overview]
Message-ID: <tencent_6F381F9526758E3CB3DA2CA9CD405A85A809@qq.com> (raw)
In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891268E800DCB@IRSMSX108.ger.corp.intel.com>

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

      reply	other threads:[~2018-11-27  3:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  9:27 bai bakari
2018-11-26 21:49 ` Dumitrescu, Cristian
2018-11-27  3:15   ` bai bakari [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_6F381F9526758E3CB3DA2CA9CD405A85A809@qq.com \
    --to=912873551@qq.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).