From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id DC418C30A for ; Fri, 13 Nov 2015 18:58:27 +0100 (CET) Received: by pacdm15 with SMTP id dm15so106438795pac.3 for ; Fri, 13 Nov 2015 09:58:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gM5eeTtZWCLrXb/2ALgEZapa3r+MvT0qvYNKFNIAZ3M=; b=l0+nWUK5vC+AOhWUva6+Hct73+Ku9duDDYeyKWH24jXyTeC1P30Qhw27xyRq5ELS1f Mhq92YatILsZtSVw160Z9zBEyh8MafhR7soA6ZXd9bPIG/WQsP1CXEbmlInGRODphak1 4z9GQ2bxqYaUYiXtsiyqbbN0QJGPAIp8n14HHWCFlS7YDVSnAxrnbbB1UmEzX9mqz0d3 NI7y5dW3KddqHGKsu+9tMPfIUxjgerD6A4JVcEO/fLHO7mF+PZtn7qHXR1Dga1ibfMMm jPgaOwXYvEGJGB9ppQ7yHSaD71uvFUowq40fmmkPrFQR2SyQymHy6g4JLE4LuL+5eeik /ejg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gM5eeTtZWCLrXb/2ALgEZapa3r+MvT0qvYNKFNIAZ3M=; b=CwBd8O2REOZH9AX15t2nLHljibpMLdlbo+auCjKlIXW5m7ycLbfkq2rUWKsaS3XA6j 1O8lneI17i+j3U8euhBZqeLGw/y3ct0+CCbbJYdkJWpc70Nu9Qp8siHxKciGCRdmtzAj 0i1nLHMtq92/DDLSZW4/rPQcKsSYeqonwkGarlpoJaVXSQ9oRO4W6swTxaCL0SZaeXox prZwIKqJRevkhXx+hj/Qc875MyOh14EADPfRUYyoos+icRIEBnjLjtG+Mey5qAPSZJkm iaALVr/ooXbPNXRgs2+ZJ+gpOI9BuDRw1PP0NTXejqdKW+qylyT2tsmUpvMfATe1FV22 dByw== X-Gm-Message-State: ALoCoQnz7VbPijUHZ1PdKkwSuq4Eq31KB/k6l+0maE8laD4f+OqBHD8e0MdRCx+8+RlnhcdKkyVK X-Received: by 10.68.217.2 with SMTP id ou2mr33329656pbc.81.1447437507317; Fri, 13 Nov 2015 09:58:27 -0800 (PST) Received: from xeon-e3.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id bd10sm21603143pbd.29.2015.11.13.09.58.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 09:58:26 -0800 (PST) From: Stephen Hemminger To: cristian.dumitrescu@intel.com Date: Fri, 13 Nov 2015 09:58:29 -0800 Message-Id: <1447437516-19152-4-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447437516-19152-1-git-send-email-stephen@networkplumber.org> References: <1447437516-19152-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org, Stephen Hemminger Subject: [dpdk-dev] [PATCH v2 03/10] sched: make debugging configurable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 17:58:28 -0000 From: Stephen Hemminger All #ifdefs in code should be enabled/disabled via DPDK config (or better yet removed all together). Signed-off-by: Stephen Hemminger --- 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