From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00191d01.pphosted.com (mx0a-00191d01.pphosted.com [67.231.149.140]) by dpdk.org (Postfix) with ESMTP id A3445A496 for ; Mon, 15 Jan 2018 16:36:52 +0100 (CET) Received: from pps.filterd (m0053301.ppops.net [127.0.0.1]) by mx0a-00191d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0FFZnZa040540; Mon, 15 Jan 2018 10:36:51 -0500 Received: from alpi155.enaf.aldc.att.com (sbcsmtp7.sbc.com [144.160.229.24]) by mx0a-00191d01.pphosted.com with ESMTP id 2fgxtx8f2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Jan 2018 10:36:51 -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 w0FFaoaN014088; Mon, 15 Jan 2018 10:36:50 -0500 Received: from mlpi408.sfdc.sbc.com (mlpi408.sfdc.sbc.com [130.9.128.240]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w0FFah8e013994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Jan 2018 10:36:45 -0500 Received: from zlp27128.vci.att.com (zlp27128.vci.att.com [135.66.87.50]) by mlpi408.sfdc.sbc.com (RSA Interceptor); Mon, 15 Jan 2018 15:36:26 GMT Received: from zlp27128.vci.att.com (zlp27128.vci.att.com [127.0.0.1]) by zlp27128.vci.att.com (Service) with ESMTP id 218B94000413; Mon, 15 Jan 2018 15:36:26 +0000 (GMT) Received: from gbcdccas02.intl.att.com (unknown [135.76.180.10]) by zlp27128.vci.att.com (Service) with ESMTPS id BC2B740006B6; Mon, 15 Jan 2018 15:36:25 +0000 (GMT) Received: from GBCDCMBX03.intl.att.com ([135.76.31.134]) by gbcdccas02.intl.att.com ([135.76.180.10]) with mapi id 14.03.0361.001; Mon, 15 Jan 2018 15:36:23 +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: AQHTiJU2egTnYjLTxUqJVRrQuGiHVKNuqhuAgAFKeICAACXXgIAADA2AgAT0dzA= Date: Mon, 15 Jan 2018 15:36:22 +0000 Message-ID: <3F9268EEC0E43747A5FFFC6B48EF0321FC1018@gbcdcmbx03.intl.att.com> References: <1507022514-21831-1> <1515425232-18888-1-git-send-email-alan.dewar@att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFB4EE@IRSMSX108.ger.corp.intel.com> <3F9268EEC0E43747A5FFFC6B48EF0321FC0CAF@gbcdcmbx03.intl.att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFC25A@IRSMSX108.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFC364@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BAFC364@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.59] 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-15_08:, , 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=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801150222 X-Mailman-Approved-At: Mon, 15 Jan 2018 18:24:39 +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: Mon, 15 Jan 2018 15:36:53 -0000 > > > > > diff --git a/lib/librte_sched/rte_red.c=20 > > > > > b/lib/librte_sched/rte_red.c > > > > > +int > > > > > +rte_red_set_scaling(uint16_t max_red_queue_length) { > > > > > + int8_t count; > > > > > + > > > > > + if (rte_red_init_done) > > > > > + /** > > > > > + * Can't change the scaling once the red table has been > > > > > + * computed. > > > > > + */ > > > > > + return -1; > > > > > > > > Is there a reason why we cannot simply reset the scaling here? > > > > > > Actually we could, but I was originally thinking that you might be=20 > > > happier keeping with a one-time RED initialization function, but=20 > > > then had to introduce the rte_reset_red_scaling function for the=20 > > > unit-tests. I'm happy > > to > > > do RED reinitialization here, if you are. > > > > >=20 > > Hi Alan, > >=20 > > What is the intention of the new rte_red_set_scaling() function? > > 1. Is it to be called only once, before any RED object gets created? > > 2. Is it possible to call it post-init, but in this case any RED=20 > > object already created are not impacted (they continue to work)? > >=20 > > If the answer is 2, then yes, we could simply drop the=20 > > __rte_red_reset() and do the RED globals reset as part of the=20 > > rte_red_set_scaling() function transparently. > >=20 > > If the answer is 1, then we probably need to keep your approach: we=20 > > need a global rte_red_init_done flag, and rte_red_set_scaling() could=20 > > only be called at init time before any red objects are created. > >=20 > > I probably need to spend more time assessing all the code implications. > >=20 > > Regards, > > Cristian > > Hi Alan, > > After talking to Tomasz, we agreed that 2. Is not an option, as any previ= ously created red object will be broken. > > So 1. Is the right answer, therefore this function can be called only onc= e and only before any red objects are created. So, IMO we should do this: -when rte_red_init_done is true, we need to return error -when rte_red_init= _done is false, we need to perform red initialization and set this flag > > Agree? Yes, as long as you're happy with keeping __rte_red_reset for the unit-test= s. > Please also add a comment in the Doxygen description of rte_red_set_calin= g() in the rte_red.h file, stating that this function can be called only on= ce and only before any red objects are created. Will do. > Regards, > Cristian