X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fhash%2Frte_cuckoo_hash.h;h=eb2644f74b1b6525652b25f7114116ababdec3e7;hb=6de0ea50e9b9d0129079689be1e335d1ffbf17d3;hp=85be49d3bbe7a1b1c57dfc79548d61d39b53cbc7;hpb=99a2dd955fba6e4cc23b77d590a033650ced9c45;p=dpdk.git diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h index 85be49d3bb..eb2644f74b 100644 --- a/lib/hash/rte_cuckoo_hash.h +++ b/lib/hash/rte_cuckoo_hash.h @@ -101,7 +101,13 @@ const rte_hash_cmp_eq_t cmp_jump_table[NUM_KEY_CMP_CASES] = { #endif -/** Number of items per bucket. */ +/** + * Number of items per bucket. + * 8 is a tradeoff between performance and memory consumption. + * When it is equal to 8, multiple 'struct rte_hash_bucket' can be fit + * on a single cache line (64 or 128 bytes long) without any gaps + * in memory between them due to alignment. + */ #define RTE_HASH_BUCKET_ENTRIES 8 #if !RTE_IS_POWER_OF_2(RTE_HASH_BUCKET_ENTRIES)