diff options
Diffstat (limited to 'lib/librte_hash/rte_cuckoo_hash.h')
-rw-r--r-- | lib/librte_hash/rte_cuckoo_hash.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/librte_hash/rte_cuckoo_hash.h b/lib/librte_hash/rte_cuckoo_hash.h index 5dfbbc48..eacdaa8d 100644 --- a/lib/librte_hash/rte_cuckoo_hash.h +++ b/lib/librte_hash/rte_cuckoo_hash.h @@ -29,6 +29,17 @@ #define RETURN_IF_TRUE(cond, retval) #endif +#if defined(RTE_LIBRTE_HASH_DEBUG) +#define ERR_IF_TRUE(cond, fmt, args...) do { \ + if (cond) { \ + RTE_LOG(ERR, HASH, fmt, ##args); \ + return; \ + } \ +} while (0) +#else +#define ERR_IF_TRUE(cond, fmt, args...) +#endif + #include <rte_hash_crc.h> #include <rte_jhash.h> |