From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00191d01.pphosted.com (mx0b-00191d01.pphosted.com [67.231.157.136]) by dpdk.org (Postfix) with ESMTP id E0B47A493 for ; Fri, 12 Jan 2018 11:45:10 +0100 (CET) Received: from pps.filterd (m0049462.ppops.net [127.0.0.1]) by m0049462.ppops.net-00191d01. (8.16.0.21/8.16.0.21) with SMTP id w0CAZTSY019372; Fri, 12 Jan 2018 05:45:10 -0500 Received: from alpi155.enaf.aldc.att.com (sbcsmtp7.sbc.com [144.160.229.24]) by m0049462.ppops.net-00191d01. with ESMTP id 2feqnutyt3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Jan 2018 05:45:10 -0500 Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w0CAj9rJ012872; Fri, 12 Jan 2018 05:45:09 -0500 Received: from mlpi409.sfdc.sbc.com (mlpi409.sfdc.sbc.com [130.9.128.241]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w0CAj3U9012861 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 12 Jan 2018 05:45:04 -0500 Received: from zlp27127.vci.att.com (zlp27127.vci.att.com [135.66.87.31]) by mlpi409.sfdc.sbc.com (RSA Interceptor); Fri, 12 Jan 2018 10:44:46 GMT Received: from zlp27127.vci.att.com (zlp27127.vci.att.com [127.0.0.1]) by zlp27127.vci.att.com (Service) with ESMTP id 6E77F40002B3; Fri, 12 Jan 2018 10:44:46 +0000 (GMT) Received: from gbcdccas01.intl.att.com (unknown [135.76.180.9]) by zlp27127.vci.att.com (Service) with ESMTPS id 2615540006D8; Fri, 12 Jan 2018 10:44:46 +0000 (GMT) Received: from GBCDCMBX03.intl.att.com ([135.76.31.134]) by gbcdccas01.intl.att.com ([135.76.180.9]) with mapi id 14.03.0361.001; Fri, 12 Jan 2018 10:44:44 +0000 From: "Dewar, Alan" To: "'Dumitrescu, Cristian'" , "'alangordondewar@gmail.com'" CC: "'dev@dpdk.org'" , "'Alan Dewar'" , "'Kantecki, Tomasz'" , "'Singh, Jasvinder'" Thread-Topic: [PATCH v5] sched: make RED scaling configurable Thread-Index: AQHTiJU2egTnYjLTxUqJVRrQuGiHVKNuqhuAgAFZlZA= Date: Fri, 12 Jan 2018 10:44:43 +0000 Message-ID: <3F9268EEC0E43747A5FFFC6B48EF0321FC0CDF@gbcdcmbx03.intl.att.com> References: <1507022514-21831-1> <1515425232-18888-1-git-send-email-alan.dewar@att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFB4EE@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BAFB4EE@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.160.174.85] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-RSA-Inspected: yes X-RSA-Classifications: public X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-12_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=522 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801120144 X-Mailman-Approved-At: Sun, 14 Jan 2018 18:13:42 +0100 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 10:45:11 -0000 Hi Cristian, > > + > > + rte_red_scaling -=3D count - RTE_RED_SCALING; > > Why not simply: rte_red_scaling =3D count? The RED code stores the moving average in a uint32_t as a pseudo floating p= oint 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. To support a maximum queue length of 2048, we need to reduce the size of th= e fractional part to nine bits, for 4096 reduce the fractional part to eigh= t bits etc. Hence the "rte_red_scaling -=3D count - RTE_RED_SCALING;" 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. Regards Alan