From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 496CB2E8F for ; Thu, 31 Aug 2017 11:53:42 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 31 Aug 2017 02:53:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,451,1498546800"; d="scan'208";a="146004720" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2017 02:53:40 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX108.ger.corp.intel.com (163.33.3.3) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 Aug 2017 10:53:40 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx111.ger.corp.intel.com ([169.254.2.30]) with mapi id 14.03.0319.002; Thu, 31 Aug 2017 10:53:40 +0100 From: "Dumitrescu, Cristian" To: Alan Dewar CC: "dev@dpdk.org" , "Kantecki, Tomasz" Thread-Topic: [PATCH] sched: make RED scaling configurable Thread-Index: AQHTIjehO5a7YcXbx0mLACPNAu9sBaKeOW8Q Date: Thu, 31 Aug 2017 09:53:39 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAAFBFF@IRSMSX108.ger.corp.intel.com> References: <1504170013-5887-1-git-send-email-alan.dewar@att.com> In-Reply-To: <1504170013-5887-1-git-send-email-alan.dewar@att.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] sched: make RED scaling configurable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2017 09:53:42 -0000 CC-ing Tomasz, the author of rte_red.[hc]. > -----Original Message----- > From: Alan Dewar [mailto:alangordondewar@gmail.com] > Sent: Thursday, August 31, 2017 10:00 AM > To: Dumitrescu, Cristian > Cc: dev@dpdk.org > Subject: [PATCH] sched: make RED scaling configurable >=20 > The RED code stores the maximum threshold is a 32-bit integer as a > pseudo fixed-point floating number with 10 fractional bits. Twelve > other bits are used to encode the filter weight, leaving just 10 bits > for the queue length. This limits the maximum queue length supported > by RED queues as 1024 packets. >=20 > Move the "hard" definitions from red.h into config/common_base so that > RED scaling can be configured during build. >=20 > Signed-off-by: Alan Dewar > --- > config/common_base | 2 ++ > lib/librte_sched/rte_red.h | 3 +-- > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/config/common_base b/config/common_base > index 5e97a08..5501dfe 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -666,6 +666,8 @@ CONFIG_RTE_SCHED_COLLECT_STATS=3Dn > CONFIG_RTE_SCHED_SUBPORT_TC_OV=3Dn > CONFIG_RTE_SCHED_PORT_N_GRINDERS=3D8 > CONFIG_RTE_SCHED_VECTOR=3Dn > +CONFIG_RTE_RED_SCALING=3D10 > +CONFIG_RTE_RED_MAX_TH_MAX=3D1023 >=20 > # > # Compile the distributor library > diff --git a/lib/librte_sched/rte_red.h b/lib/librte_sched/rte_red.h > index ca12227..49d3379 100644 > --- a/lib/librte_sched/rte_red.h > +++ b/lib/librte_sched/rte_red.h > @@ -51,10 +51,9 @@ extern "C" { > #include > #include > #include > +#include >=20 > -#define RTE_RED_SCALING 10 /**< Fraction siz= e for fixed- > point */ > #define RTE_RED_S (1 << 22) /**< Packet size = multiplied by > number of leaf queues */ > -#define RTE_RED_MAX_TH_MAX 1023 /**< Max threshol= d limit > in fixed point format */ > #define RTE_RED_WQ_LOG2_MIN 1 /**< Min inverse = filter > weight value */ > #define RTE_RED_WQ_LOG2_MAX 12 /**< Max inverse = filter > weight value */ > #define RTE_RED_MAXP_INV_MIN 1 /**< Min inverse = mark > probability value */ > -- > 2.1.4