From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 34C55A492 for ; Fri, 12 Jan 2018 12:43:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2018 03:43:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,348,1511856000"; d="scan'208";a="193355911" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga005.jf.intel.com with ESMTP; 12 Jan 2018 03:43:20 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0319.002; Fri, 12 Jan 2018 11:43:19 +0000 From: "Dumitrescu, Cristian" To: "Dewar, Alan" , "'alangordondewar@gmail.com'" CC: "'dev@dpdk.org'" , 'Alan Dewar' , "Kantecki, Tomasz" , "Singh, Jasvinder" Thread-Topic: [PATCH v5] sched: make RED scaling configurable Thread-Index: AQHTiJU2ELlQTwI26UWIYEeOEuz1fKNuoCmwgAFzYoCAAA+J8A== Date: Fri, 12 Jan 2018 11:43:19 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAFC30B@IRSMSX108.ger.corp.intel.com> References: <1507022514-21831-1> <1515425232-18888-1-git-send-email-alan.dewar@att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFB4EE@IRSMSX108.ger.corp.intel.com> <3F9268EEC0E43747A5FFFC6B48EF0321FC0CDF@gbcdcmbx03.intl.att.com> In-Reply-To: <3F9268EEC0E43747A5FFFC6B48EF0321FC0CDF@gbcdcmbx03.intl.att.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 v5] 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: Fri, 12 Jan 2018 11:43:23 -0000 > -----Original Message----- > From: Dewar, Alan [mailto:ad759e@intl.att.com] > Sent: Friday, January 12, 2018 10:45 AM > To: Dumitrescu, Cristian ; > 'alangordondewar@gmail.com' > Cc: 'dev@dpdk.org' ; 'Alan Dewar' ; > Kantecki, Tomasz ; Singh, Jasvinder > > Subject: RE: [PATCH v5] sched: make RED scaling configurable >=20 > Hi Cristian, >=20 > > > + > > > + rte_red_scaling -=3D count - RTE_RED_SCALING; > > > > Why not simply: rte_red_scaling =3D count? >=20 > The RED code stores the moving average in a uint32_t as a pseudo floating > point number with a fixed sized fractional part of 10 bits. > This allows a maximum queue length of 1024. To support larger queues, > the size of the fixed size fractional part needs to be reduced. >=20 > To support a maximum queue length of 2048, we need to reduce the size of > the fractional part to nine bits, for 4096 reduce the fractional part to = eight > bits etc. >=20 > Hence the "rte_red_scaling -=3D count - RTE_RED_SCALING;" >=20 > It is just coincidence that RTE_RED_SCALING is 10 and 1024 =3D 2**10. >=20 > I hope that's clear, it took me a time to get my head around it again. >=20 > Regards > Alan Hi Alan, After taking to Tomasz, I can also confirm you're right, so let's keep your= initial proposal here. This line of code will only work if this function is called once at most (t= his was my rationale to suggest the change), but this is fine, as this is e= nforced by testing the red_init flag when this function starts. Regards, Cristian