Hey Pragash,
You can pass your own hash function to rte_hash_create() otherwise a
default one will be used, see
http://dpdk.org/browse/dpdk/tree/lib/librte_hash/rte_cuckoo_hash.c#n281
The default hash function is rte_hash_crc() or in some cases rte_jhash(), see
http://dpdk.org/browse/dpdk/tree/lib
Thats great, what about the hash functions.
On 24 Aug 2017 10:54, "Andriy Berestovskyy" wrote:
> Hey Pragash,
> I am not the author of the code, but I guess it is done that way
> because modern compilers do recognize power of two constants and do
> substitute division and modulo operations with c
Hey Pragash,
I am not the author of the code, but I guess it is done that way
because modern compilers do recognize power of two constants and do
substitute division and modulo operations with corresponding bit
manipulations.
Just try to compile a small program like the following:
volatile unsign
And yea, mod will take only 1 Clock cycle that way :)
Also if divisor is a power of 2, a / b can be done like
( Given a is unsigned, a > b and since our hash values are greater than 0,
a is our hash value, b the power of 2)
while(b != 1) {
a >>= 1;
b >>= 1;
}
which is less clock cycle
Hi ,
The performance will depend on the time taken for calculating the hash1 and
hash2 values for each lookup.
Can i know which hash functions are used to calculate the hash values for
each incoming key. We use CRC32 which uses xxhash i guess.
I could not find the implementation of the hash funct
> -Original Message-
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Pragash
> Vijayaragavan
> Sent: Wednesday, August 23, 2017 3:16 PM
> To: dev@dpdk.org
> Cc: Minseok Kwon
> Subject: [dpdk-dev] cuckoo hash in dpdk
>
> Hi,
>
> I got the chance to look at the cuckoo hash used in
6 matches
Mail list logo