From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by dpdk.org (Postfix) with ESMTP id EFDE9C318 for ; Fri, 13 Nov 2015 18:58:28 +0100 (CET) Received: by pacdm15 with SMTP id dm15so106439177pac.3 for ; Fri, 13 Nov 2015 09:58:28 -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=6xglqxBF15N9wdcZivK8CeNtzSn19G2qA+XuvO/XT9o=; b=y/xfpKTkQPt+AwDTy/cIV61Hkv9VWrDDRaGUcptJSO0IddDBMavUS/27aIyB1HLV+q d7YVibqrJoAHhIXE8mJ610XhDtzAlvx5WgMwnbdMCvPec+stWT1RrKMRfPs0JDujrU7n Z0DK1EPBmKsCj3nQ8MznbpaVlRW2NS5fuJLDU1rf7pAagM30dZmkFzfkhqtobIFrfFxQ VDxJBTN8VlEM8nPwAuB4D7nGvivPUtn58krttodRPK4se5y++bvoFh80gm8xzo5bbFET axgr3ESIdn1nQk1WRc6nsKL3PESC59+7ob+LeKt4lcmxofArBbGhBpoiftR+BE5LyyEu 3ZvA== 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=6xglqxBF15N9wdcZivK8CeNtzSn19G2qA+XuvO/XT9o=; b=kYuhnNZbHZXPFrLgDzoCaU7JIrub3cXrl2OsFNuIeQ23Le6BDerdFPdqyz0uW+KyZw 2HY0qN1lsJRynBXTSkmA2/anPSCFFWv8g/SHSlf5dPDAgJF4dl7WmTfuAIwzrJa8xsR1 nKRC80p7ngE4citNbG6vc5crh/mLBGf4NW9+XZnpIZzPi1pTA7trjchcljBSJk+o+L8C jpDG3Dqnp1lnDeV55CGTdIGVl6SuCm86huF35TcT3fQDSFavajdVqx+7BxSAGQHk02Ge Dti8B5tmtg4jO9xkFXDfv5yPkzOPQHbYQDcb7pKzijbfOZU9t5d34DKXI5tiI3mw0z8l ElIA== X-Gm-Message-State: ALoCoQmqifuzP1lLXvfZwNUm5efIqr7n1DYuNvfJFpvYAs1/7b/n7tnLlOiShrpvTlV2Y5IytiVb X-Received: by 10.68.244.234 with SMTP id xj10mr34282515pbc.6.1447437508398; Fri, 13 Nov 2015 09:58:28 -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.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 09:58:27 -0800 (PST) From: Stephen Hemminger To: cristian.dumitrescu@intel.com Date: Fri, 13 Nov 2015 09:58:30 -0800 Message-Id: <1447437516-19152-5-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 04/10] sched: drop debug #ifdef's for credit check 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:29 -0000 From: Stephen Hemminger Drop conditional code which was for debugging credit checks. It is hard to maintain code with any additional #ifdef baggage. Signed-off-by: Stephen Hemminger --- lib/librte_sched/rte_sched.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 4dcf92c..689f001 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -62,16 +62,6 @@ #define RTE_SCHED_ENQUEUE 1 -#define RTE_SCHED_TS 1 - -#if RTE_SCHED_TS == 0 /* Infinite credits. Traffic shaping disabled. */ -#define RTE_SCHED_TS_CREDITS_UPDATE 0 -#define RTE_SCHED_TS_CREDITS_CHECK 0 -#else /* Real Credits. Full traffic shaping implemented. */ -#define RTE_SCHED_TS_CREDITS_UPDATE 1 -#define RTE_SCHED_TS_CREDITS_CHECK 1 -#endif - #ifndef RTE_SCHED_TB_RATE_CONFIG_ERR #define RTE_SCHED_TB_RATE_CONFIG_ERR (1e-7) #endif @@ -1478,11 +1468,7 @@ rte_sched_port_enqueue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint #endif /* RTE_SCHED_ENQUEUE */ -#if RTE_SCHED_TS_CREDITS_UPDATE == 0 - -#define grinder_credits_update(port, pos) - -#elif !defined(RTE_SCHED_SUBPORT_TC_OV) +#if !defined(RTE_SCHED_SUBPORT_TC_OV) static inline void grinder_credits_update(struct rte_sched_port *port, uint32_t pos) @@ -1615,7 +1601,6 @@ grinder_credits_update(struct rte_sched_port *port, uint32_t pos) #endif /* RTE_SCHED_TS_CREDITS_UPDATE, RTE_SCHED_SUBPORT_TC_OV */ -#if RTE_SCHED_TS_CREDITS_CHECK #ifndef RTE_SCHED_SUBPORT_TC_OV @@ -1696,7 +1681,6 @@ grinder_credits_check(struct rte_sched_port *port, uint32_t pos) #endif /* RTE_SCHED_SUBPORT_TC_OV */ -#endif /* RTE_SCHED_TS_CREDITS_CHECK */ static inline int grinder_schedule(struct rte_sched_port *port, uint32_t pos) @@ -1706,11 +1690,9 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos) struct rte_mbuf *pkt = grinder->pkt; uint32_t pkt_len = pkt->pkt_len + port->frame_overhead; -#if RTE_SCHED_TS_CREDITS_CHECK if (!grinder_credits_check(port, pos)) { return 0; } -#endif /* Advance port time */ port->time += pkt_len; -- 2.1.4