[v1,07/17] hash: replace library debug flag with global one

Message ID 20200417215739.23180-8-l.wojciechow@partner.samsung.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series introduce global debug flag |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Lukasz Wojciechowski April 17, 2020, 9:57 p.m. UTC
  Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_HASH_DEBUG.
The old define is completely removed from source code and config.

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 config/common_base                | 1 -
 lib/librte_hash/rte_cuckoo_hash.h | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/config/common_base b/config/common_base
index ea5ccafc9..a12a869a9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -877,7 +877,6 @@  CONFIG_RTE_LIBRTE_CMDLINE=y
 # Compile librte_hash
 #
 CONFIG_RTE_LIBRTE_HASH=y
-CONFIG_RTE_LIBRTE_HASH_DEBUG=n
 
 #
 # Compile librte_efd
diff --git a/lib/librte_hash/rte_cuckoo_hash.h b/lib/librte_hash/rte_cuckoo_hash.h
index 345de6bf9..57ef74a47 100644
--- a/lib/librte_hash/rte_cuckoo_hash.h
+++ b/lib/librte_hash/rte_cuckoo_hash.h
@@ -20,7 +20,7 @@ 
 #endif
 
 /* Macro to enable/disable run-time checking of function parameters */
-#if defined(RTE_LIBRTE_HASH_DEBUG)
+#ifdef RTE_DEBUG
 #define RETURN_IF_TRUE(cond, retval) do { \
 	if (cond) \
 		return retval; \
@@ -29,7 +29,7 @@ 
 #define RETURN_IF_TRUE(cond, retval)
 #endif
 
-#if defined(RTE_LIBRTE_HASH_DEBUG)
+#ifdef RTE_DEBUG
 #define ERR_IF_TRUE(cond, fmt, args...) do { \
 	if (cond) { \
 		RTE_LOG(ERR, HASH, fmt, ##args); \