From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 75C2B7D30 for ; Thu, 4 Jan 2018 19:25:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jan 2018 10:25:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,315,1511856000"; d="scan'208";a="24348530" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga002.jf.intel.com with ESMTP; 04 Jan 2018 10:25:45 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 4 Jan 2018 18:25:45 +0000 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx112.ger.corp.intel.com ([169.254.1.12]) with mapi id 14.03.0319.002; Thu, 4 Jan 2018 18:25:44 +0000 From: "Dumitrescu, Cristian" To: "Dewar, Alan" , "'alangordondewar@gmail.com'" CC: "'dev@dpdk.org'" , 'Alan Dewar' Thread-Topic: [PATCH v4] sched: make RED scaling configurable Thread-Index: AQHTPCkmMC45iwutMkmJVpgYoHqKcqNhViyggAFwGgCAAB0LIIABZeUAgABO/dA= Date: Thu, 4 Jan 2018 18:25:44 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAF8B99@IRSMSX108.ger.corp.intel.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> <3F9268EEC0E43747A5FFFC6B48EF0321FBE783@gbcdcmbx03.intl.att.com> In-Reply-To: <3F9268EEC0E43747A5FFFC6B48EF0321FBE783@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.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 18:25:50 -0000 > -----Original Message----- > From: Dewar, Alan [mailto:ad759e@intl.att.com] > Sent: Thursday, January 4, 2018 1:35 PM > To: Dumitrescu, Cristian ; > 'alangordondewar@gmail.com' > Cc: 'dev@dpdk.org' ; 'Alan Dewar' > Subject: RE: [PATCH v4] sched: make RED scaling configurable >=20 > > > > > +int > > > > > +rte_red_set_scaling(uint16_t max_red_queue_length); > > > > > + > > > > > +/** > > > > > + * @brief Reset the RED scaling factor - only for use by RED > > > > > +unit-tests > > > > > + * > > > > > + * @return Operation status > > > > > + */ > > > > > +void > > > > > +rte_red_reset_scaling(void); > > > > > > > > As stated above, this function is probably not useful and my vote i= s > > > > to > > > remove it. > > > > > > > > > > It is needed by the revised unit-test program. This function can't b= e > > > moved into the unit-test program because it needs to reset variables > > > that are statically declared within rte_red.c > > > > > > > > > > Hi Alan, > > > > We only put API that makes sense for a real app, not for unit test. >=20 > I didn't add rte_red_reset_scaling function to > lib/librte_sched/rte_sched_version.map, so doesn't that mean that this > function wouldn't be part of the rte_sched library's external API? Nope, it does not work this way. >=20 > > About unit tests: Each test in the unit test suite should start from sc= ratch, > i.e. create a RED object from scratch, configure it, use it, free it rath= er than > use RED objects created by previous tests. We need to avoid the latter > approach, as it is creating fake dependencies between tests that alter th= e > overall test results. Each test should be independent, and not rely on > previous tests. Makes sense? >=20 > I can appreciate what you are suggesting, but rte_red.c does some one-tim= e > initialization of a module static array called rte_red_log2_1_minus_Wq. = The > 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= - > tests. The new RED unit-tests need to use different scaling factors. >=20 > 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 > building all the sub-tests into a single image and using the test-harness= 's > command-line to select which sub-test to execute. >=20 > As an alternative I'm guessing that we could change how rte_red.c does it= s > initialization. >=20 OK, makes sense to me. Let's create an API function with the updated name o= f __rte_red_reset() which resets all globals and forces retrain of the modu= le. It should be part of the API map. > Regards > Alan >=20 >=20 > > > > Regards, > > Cristian