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 8A3DA7D19 for ; Thu, 4 Jan 2018 14:36:56 +0100 (CET) Received: from pps.filterd (m0049287.ppops.net [127.0.0.1]) by m0049287.ppops.net-00191d01. (8.16.0.21/8.16.0.21) with SMTP id w04Daogv042442; Thu, 4 Jan 2018 08:36:55 -0500 Received: from alpi155.enaf.aldc.att.com (sbcsmtp7.sbc.com [144.160.229.24]) by m0049287.ppops.net-00191d01. with ESMTP id 2f9hxsk3qt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jan 2018 08:36:54 -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 w04DYw7f015760; Thu, 4 Jan 2018 08:34:58 -0500 Received: from mlpi407.sfdc.sbc.com (mlpi407.sfdc.sbc.com [130.9.128.239]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w04DYqnj015718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Jan 2018 08:34:53 -0500 Received: from zlp27130.vci.att.com (zlp27130.vci.att.com [135.66.87.38]) by mlpi407.sfdc.sbc.com (RSA Interceptor); Thu, 4 Jan 2018 13:34:40 GMT Received: from zlp27130.vci.att.com (zlp27130.vci.att.com [127.0.0.1]) by zlp27130.vci.att.com (Service) with ESMTP id AB3A14000533; Thu, 4 Jan 2018 13:34:40 +0000 (GMT) Received: from gbcdccas03.intl.att.com (unknown [135.76.180.11]) by zlp27130.vci.att.com (Service) with ESMTPS id 5B0154000688; Thu, 4 Jan 2018 13:34:40 +0000 (GMT) Received: from GBCDCMBX03.intl.att.com ([135.76.31.134]) by gbcdccas03.intl.att.com ([135.76.180.11]) with mapi id 14.03.0361.001; Thu, 4 Jan 2018 13:34:38 +0000 From: "Dewar, Alan" To: "'Dumitrescu, Cristian'" , "'alangordondewar@gmail.com'" CC: "'dev@dpdk.org'" , "'Alan Dewar'" Thread-Topic: [PATCH v4] sched: make RED scaling configurable Thread-Index: AQHTPCkh2575WNSGDEy9pEaExW6DkKNhWVeAgAFmFmCAACXWgIABXxcQ Date: Thu, 4 Jan 2018 13:34:38 +0000 Message-ID: <3F9268EEC0E43747A5FFFC6B48EF0321FBE783@gbcdcmbx03.intl.att.com> References: <1505913120-5521-1-git-send-email-alan.dewar@att.com> <1507022514-21831-1-git-send-email-alan.dewar@att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAF7F2A@IRSMSX108.ger.corp.intel.com> <3F9268EEC0E43747A5FFFC6B48EF0321FBE645@gbcdcmbx03.intl.att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAF86FB@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BAF86FB@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.41] 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-04_06:, , 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801040187 X-Mailman-Approved-At: Fri, 05 Jan 2018 10:18:27 +0100 Subject: Re: [dpdk-dev] [PATCH v4] 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, 04 Jan 2018 13:36:58 -0000 > > > > +int > > > > +rte_red_set_scaling(uint16_t max_red_queue_length); > > > > + > > > > +/** > > > > + * @brief Reset the RED scaling factor - only for use by RED=20 > > > > +unit-tests > > > > + * > > > > + * @return Operation status > > > > + */ > > > > +void > > > > +rte_red_reset_scaling(void); > > > > > > As stated above, this function is probably not useful and my vote is= =20 > > > to > > remove it. > > > > >=20 > > It is needed by the revised unit-test program. This function can't be= =20 > > moved into the unit-test program because it needs to reset variables=20 > > that are statically declared within rte_red.c > >=20 > >=20 > > Hi Alan, > > We only put API that makes sense for a real app, not for unit test. I didn't add rte_red_reset_scaling function to lib/librte_sched/rte_sched_v= ersion.map, so doesn't that mean that this function wouldn't be part of the= rte_sched library's external API? =20 > About unit tests: Each test in the unit test suite should start from scra= tch, i.e. create a RED object from scratch, configure it, use it, free it r= ather than use RED objects created by previous tests. We need to avoid the = latter approach, as it is creating fake dependencies between tests that alt= er the overall test results. Each test should be independent, and not rely = on previous tests. Makes sense? I can appreciate what you are suggesting, but rte_red.c does some one-time = initialization of a module static array called rte_red_log2_1_minus_Wq. Th= e values assigned to elements in this array depend upon what the RED scalin= g factor is set to. This means that the first RED sub-test that calls rte= _red_config_init imposes its scaling factor for all subsequent RED sub-test= s. The new RED unit-tests need to use different scaling factors. The only way to make these RED sub-tests completely independent would be to= create and execute separate test images for each sub-test, rather than bui= lding all the sub-tests into a single image and using the test-harness's co= mmand-line to select which sub-test to execute.=20 As an alternative I'm guessing that we could change how rte_red.c does its = initialization. Regards Alan > > Regards, > Cristian