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
t;>
>>
>> > -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
om: 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 t
> -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 chanc
Hi,
I got the chance to look at the cuckoo hash used in dpdk and have a query.
would using division and modulo operations be slower than bitwise
operations on RTE_HASH_BUCKET_ENTRIES, specially since
RTE_HASH_BUCKET_ENTRIES is a power of 2.
For example, to do a modulo we can do a "AND" operation
7 matches
Mail list logo