[v1,09/17] lpm: replace library debug flag with global one
Checks
Commit Message
Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_LPM_DEBUG.
The old define is completely removed from source code and config.
Application of the flag in tests was also adjusted.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
app/test/test_lpm.c | 2 +-
config/common_base | 1 -
lib/librte_lpm/rte_lpm.c | 2 +-
lib/librte_lpm/rte_lpm.h | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
@@ -234,7 +234,7 @@ test4(void)
int32_t
test5(void)
{
-#if defined(RTE_LIBRTE_LPM_DEBUG)
+#ifdef RTE_DEBUG
struct rte_lpm *lpm = NULL;
struct rte_lpm_config config;
@@ -933,7 +933,6 @@ CONFIG_RTE_LIBRTE_FIB=y
# Compile librte_lpm
#
CONFIG_RTE_LIBRTE_LPM=y
-CONFIG_RTE_LIBRTE_LPM_DEBUG=n
#
# Compile librte_acl
@@ -40,7 +40,7 @@ enum valid_flag {
};
/* Macro to enable/disable run-time checks. */
-#if defined(RTE_LIBRTE_LPM_DEBUG)
+#ifdef RTE_DEBUG
#include <rte_debug.h>
#define VERIFY_DEPTH(depth) do { \
if ((depth == 0) || (depth > RTE_LPM_MAX_DEPTH)) \
@@ -48,7 +48,7 @@ extern "C" {
RTE_LPM_TBL8_GROUP_NUM_ENTRIES)
/** @internal Macro to enable/disable run-time checks. */
-#if defined(RTE_LIBRTE_LPM_DEBUG)
+#ifdef RTE_DEBUG
#define RTE_LPM_RETURN_IF_TRUE(cond, retval) do { \
if (cond) return (retval); \
} while (0)