git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
hash: validate hash bucket entries while compiling
[dpdk.git]
/
lib
/
librte_hash
/
rte_cuckoo_hash.h
diff --git
a/lib/librte_hash/rte_cuckoo_hash.h
b/lib/librte_hash/rte_cuckoo_hash.h
index
7a54e55
..
bd6ad1b
100644
(file)
--- 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