From: Stephen Hemminger Date: Fri, 13 Nov 2015 17:58:29 +0000 (-0800) Subject: sched: make debugging configurable X-Git-Tag: spdx-start~7971 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a11d923aa82b678154007e856b4dc796abd14c38;p=dpdk.git sched: make debugging configurable All #ifdefs in code should be enabled/disabled via DPDK config (or better yet removed all together). Signed-off-by: Stephen Hemminger --- diff --git a/config/common_bsdapp b/config/common_bsdapp index bdf1fcd15f..4be6bc0209 100644 --- a/config/common_bsdapp +++ b/config/common_bsdapp @@ -400,6 +400,7 @@ CONFIG_RTE_LIBRTE_METER=y # Compile librte_sched # CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n CONFIG_RTE_SCHED_RED=n CONFIG_RTE_SCHED_COLLECT_STATS=n CONFIG_RTE_SCHED_SUBPORT_TC_OV=n diff --git a/config/common_linuxapp b/config/common_linuxapp index a56515359b..5d81822705 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -409,6 +409,7 @@ CONFIG_RTE_LIBRTE_METER=y # Compile librte_sched # CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n CONFIG_RTE_SCHED_RED=n CONFIG_RTE_SCHED_COLLECT_STATS=n CONFIG_RTE_SCHED_SUBPORT_TC_OV=n diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 52a22d5a31..4dcf92c68d 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -52,10 +52,6 @@ #pragma warning(disable:2259) /* conversion may lose significant bits */ #endif -#ifndef RTE_SCHED_DEBUG -#define RTE_SCHED_DEBUG 0 -#endif - #ifndef RTE_SCHED_OPTIMIZATIONS #define RTE_SCHED_OPTIMIZATIONS 0 #endif @@ -1050,7 +1046,7 @@ rte_sched_port_qsize(struct rte_sched_port *port, uint32_t qindex) return port->qsize[tc]; } -#if RTE_SCHED_DEBUG +#ifdef RTE_SCHED_DEBUG static inline int rte_sched_port_queue_is_empty(struct rte_sched_port *port, uint32_t qindex) @@ -1162,7 +1158,7 @@ rte_sched_port_set_queue_empty_timestamp(struct rte_sched_port *port, uint32_t q #endif /* RTE_SCHED_RED */ -#if RTE_SCHED_DEBUG +#ifdef RTE_SCHED_DEBUG static inline int debug_pipe_is_empty(struct rte_sched_port *port, uint32_t pindex) @@ -1896,7 +1892,7 @@ grinder_next_pipe(struct rte_sched_port *port, uint32_t pos) return 0; } -#if RTE_SCHED_DEBUG +#ifdef RTE_SCHED_DEBUG debug_check_queue_slab(port, bmp_pos, bmp_slab); #endif