From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id AA8B1A48D for ; Fri, 12 Jan 2018 12:52:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2018 03:52:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,348,1511856000"; d="scan'208";a="194424405" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 12 Jan 2018 03:52:30 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX102.ger.corp.intel.com ([169.254.2.180]) with mapi id 14.03.0319.002; Fri, 12 Jan 2018 11:52:28 +0000 From: "Dumitrescu, Cristian" To: "Dumitrescu, Cristian" , "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: AQHTiJU2ELlQTwI26UWIYEeOEuz1fKNuoCmwgAFgwwCAABa+AIAADGEA Date: Fri, 12 Jan 2018 11:52:27 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAFC364@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> <3F9268EEC0E43747A5FFFC6B48EF0321FC0CAF@gbcdcmbx03.intl.att.com> <3EB4FA525960D640B5BDFFD6A3D891267BAFC25A@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BAFC25A@IRSMSX108.ger.corp.intel.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:52:33 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dumitrescu, > Cristian > Sent: Friday, January 12, 2018 11:09 AM > To: Dewar, Alan ; 'alangordondewar@gmail.com' > > Cc: 'dev@dpdk.org' ; 'Alan Dewar' ; > Kantecki, Tomasz ; Singh, Jasvinder > > Subject: Re: [dpdk-dev] [PATCH v5] sched: make RED scaling configurable >=20 > ... >=20 > > > > diff --git a/lib/librte_sched/rte_red.c 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 happ= ier > > keeping with a one-time RED initialization function, but then had to > > introduce the rte_reset_red_scaling function for the unit-tests. I'm ha= ppy > 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 object > already created are not impacted (they continue to work)? >=20 > If the answer is 2, then yes, we could simply drop the __rte_red_reset() = and > do the RED globals reset as part of the rte_red_set_scaling() function > transparently. >=20 > If the answer is 1, then we probably need to keep your approach: we need = a > global rte_red_init_done flag, and rte_red_set_scaling() could only be ca= lled > 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 previou= sly created red object will be broken. So 1. Is the right answer, therefore this function can be called only once = 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? Please also add a comment in the Doxygen description of rte_red_set_caling(= ) in the rte_red.h file, stating that this function can be called only once= and only before any red objects are created. Regards, Cristian