[dpdk-dev] DPDK Hash library

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Jul 2 19:55:20 CEST 2015


Hi Jaffar,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Abdul, Jaffar
> Sent: Thursday, July 02, 2015 6:38 PM
> To: Richardson, Bruce
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] DPDK Hash library
> 
> HI Bruce,
> 
> Thanks for your inputs. I am wondering why Cuckoo hash is pushing the entry
> into new bucket why not add a new entry in the same bucket ?
> 
> Do we see this is better or faster compared to creating one more new entry
> in the same bucket

You are probably talking about extendable buckets here.
The downsize of that approach is that you have to allocate memory on the fly,
whereas with the cuckoo hash implementation, the entry can be stored in an alternative bucket
without having to reserve more memory (which also will take you more time).
With this approach, hash tables can get a higher utilization, as other less used
buckets can be used to store keys from other busier buckets.

Pablo
> 
> Thanks
> Jaffar
> 
> 
> -----Original Message-----
> From: Bruce Richardson [mailto:bruce.richardson at intel.com]
> Sent: Thursday, July 02, 2015 2:36 AM
> To: Abdul, Jaffar
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] DPDK Hash library
> 
> On Wed, Jul 01, 2015 at 07:56:28PM -0400, Abdul, Jaffar wrote:
> > Hi,
> >
> > I am wondering how can I use the hash library if I don't know the
> > number of entries in the bucket (number of entries in the bucket can grow
> dynamically) I am trying to use the DPDK hash library for MAC table where I
> can't give the fixed number of elements in each bucket.
> 
> The current DPDK hash library does not support this, unfortunately. There is
> currently an effort underway to do a cuckoo hash implementation for DPDK
> (patches already on-list), to allow items to move between buckets rather
> than just failing if a bucket is full. Please feel free to try out these patches
> and provide feedback on them if you can!
> 
> 	/Bruce
> >


More information about the dev mailing list