X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_hash%2Frte_cuckoo_hash.h;h=bd6ad1bd66703f6a00aaa261326da46771e6a335;hb=7c872b96983a23f67d6cea37b232717c346a83ff;hp=7a54e55575f17d9294bbe4d90643e4413e9c89a8;hpb=5cc0ee66e4cc2fb7ca519514be9f6af54a047a53;p=dpdk.git diff --git a/lib/librte_hash/rte_cuckoo_hash.h b/lib/librte_hash/rte_cuckoo_hash.h index 7a54e55575..bd6ad1bd66 100644 --- a/lib/librte_hash/rte_cuckoo_hash.h +++ b/lib/librte_hash/rte_cuckoo_hash.h @@ -97,6 +97,10 @@ enum add_key_case { /** Number of items per bucket. */ #define RTE_HASH_BUCKET_ENTRIES 8 +#if !RTE_IS_POWER_OF_2(RTE_HASH_BUCKET_ENTRIES) +#error RTE_HASH_BUCKET_ENTRIES must be a power of 2 +#endif + #define NULL_SIGNATURE 0 #define EMPTY_SLOT 0