DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: cristian.dumitrescu@intel.com
Cc: dev@dpdk.org, Stephen Hemminger <shemming@brocade.com>
Subject: [dpdk-dev] [PATCH v2 03/10] sched: make debugging configurable
Date: Fri, 13 Nov 2015 09:58:29 -0800	[thread overview]
Message-ID: <1447437516-19152-4-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1447437516-19152-1-git-send-email-stephen@networkplumber.org>

From: Stephen Hemminger <shemming@brocade.com>

All #ifdefs in code should be enabled/disabled via DPDK config
(or better yet removed all together).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_bsdapp         |  1 +
 config/common_linuxapp       |  1 +
 lib/librte_sched/rte_sched.c | 10 +++-------
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 7df0763..8717fb7 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -395,6 +395,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 52173d5..9392dd8 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -403,6 +403,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 52a22d5..4dcf92c 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
 
-- 
2.1.4

  parent reply	other threads:[~2015-11-13 17:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 17:58 [dpdk-dev] [PATCH v2 00/10] rte_sched: enhancements and cleanups Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 01/10] sched: drop deprecated port hierarchy structure Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 02/10] sched: cleanup comments Stephen Hemminger
2015-11-13 17:58 ` Stephen Hemminger [this message]
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 04/10] sched: drop debug #ifdef's for credit check Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 05/10] sched: remove debug conditional code around ENQUEUE Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 06/10] sched: drop RTE_SCHED_WRR #define Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 07/10] sched: cleanup defined constants Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 08/10] sched: allow enabling SSE optimizations in config Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 09/10] sched: fix coding style Stephen Hemminger
2015-11-13 17:58 ` [dpdk-dev] [PATCH v2 10/10] sched: allow more subports Stephen Hemminger
2015-11-24 23:34 ` [dpdk-dev] [PATCH v2 00/10] rte_sched: enhancements and cleanups Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447437516-19152-4-git-send-email-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=shemming@brocade.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).