Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_TIMER_DEBUG.
The old define is completely removed from source code and config.
The tests were adjusted to use new flag.

Signed-off-by: Lukasz Wojciechowski <l.wojciec...@partner.samsung.com>
---
 app/test/test_timer_secondary.c |  2 +-
 config/common_base              |  1 -
 lib/librte_timer/rte_timer.c    | 12 ++++++------
 lib/librte_timer/rte_timer.h    |  2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c
index 7a3bc873b..7f3d5645c 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -158,7 +158,7 @@ test_timer_secondary(void)
                test_info->exit_flag = 1;
                rte_eal_wait_lcore(*mgr_lcorep);
 
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
                rte_timer_alt_dump_stats(test_info->timer_data_id, stdout);
 #endif
 
diff --git a/config/common_base b/config/common_base
index c22e9a6fe..025ae7c62 100644
--- a/config/common_base
+++ b/config/common_base
@@ -859,7 +859,6 @@ CONFIG_RTE_PKTMBUF_HEADROOM=128
 # Compile librte_timer
 #
 CONFIG_RTE_LIBRTE_TIMER=y
-CONFIG_RTE_LIBRTE_TIMER_DEBUG=n
 
 #
 # Compile librte_cfgfile
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 89f27074f..fc96b1a2c 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -48,7 +48,7 @@ struct priv_timer {
        /** running timer on this lcore now */
        struct rte_timer *running_tim;
 
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
        /** per-lcore statistics */
        struct rte_timer_debug_stats stats;
 #endif
@@ -68,7 +68,7 @@ static const uint32_t default_data_id;
 static uint32_t rte_timer_subsystem_initialized;
 
 /* when debug is enabled, store some statistics */
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
 #define __TIMER_STAT_ADD(priv_timer, name, n) do {                     \
                unsigned __lcore_id = rte_lcore_id();                   \
                if (__lcore_id < RTE_MAX_LCORE)                         \
@@ -302,7 +302,7 @@ timer_set_running_state(struct rte_timer *tim)
 static uint32_t
 timer_get_skiplist_level(unsigned curr_depth)
 {
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
        static uint32_t i, count = 0;
        static uint32_t levels[MAX_SKIPLIST_DEPTH] = {0};
 #endif
@@ -321,7 +321,7 @@ timer_get_skiplist_level(unsigned curr_depth)
                level = curr_depth;
        if (level >= MAX_SKIPLIST_DEPTH)
                level = MAX_SKIPLIST_DEPTH-1;
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
        count ++;
        levels[level]++;
        if (count % 10000 == 0)
@@ -1008,7 +1008,7 @@ rte_timer_next_ticks(void)
 static void
 __rte_timer_dump_stats(struct rte_timer_data *timer_data __rte_unused, FILE *f)
 {
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
        struct rte_timer_debug_stats sum;
        unsigned lcore_id;
        struct priv_timer *priv_timer = timer_data->priv_timer;
@@ -1026,7 +1026,7 @@ __rte_timer_dump_stats(struct rte_timer_data *timer_data 
__rte_unused, FILE *f)
        fprintf(f, "  manage = %"PRIu64"\n", sum.manage);
        fprintf(f, "  pending = %"PRIu64"\n", sum.pending);
 #else
-       fprintf(f, "No timer statistics, RTE_LIBRTE_TIMER_DEBUG is disabled\n");
+       fprintf(f, "No timer statistics, RTE_DEBUG is disabled\n");
 #endif
 }
 
diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h
index c6b3d450d..b4edd3f30 100644
--- a/lib/librte_timer/rte_timer.h
+++ b/lib/librte_timer/rte_timer.h
@@ -73,7 +73,7 @@ union rte_timer_status {
        uint32_t u32;            /**< To atomic-set status + owner. */
 };
 
-#ifdef RTE_LIBRTE_TIMER_DEBUG
+#ifdef RTE_DEBUG
 /**
  * A structure that stores the timer statistics (per-lcore).
  */
-- 
2.17.1

Reply via email to