From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC79BA0487 for ; Tue, 2 Jul 2019 15:26:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB2645B3E; Tue, 2 Jul 2019 15:26:27 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 62E122BC8 for ; Tue, 2 Jul 2019 15:26:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 06:26:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,443,1557212400"; d="scan'208";a="154433736" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga007.jf.intel.com with ESMTP; 02 Jul 2019 06:26:24 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.140]) by irsmsx105.ger.corp.intel.com ([169.254.7.184]) with mapi id 14.03.0439.000; Tue, 2 Jul 2019 14:26:22 +0100 From: "Singh, Jasvinder" To: "Dumitrescu, Cristian" , "dev@dpdk.org" CC: "Tovar, AbrahamX" , "Krakowiak, LukaszX" Thread-Topic: [PATCH v2 01/28] sched: update macros for flexible config Thread-Index: AQHVMD/bnzj/236QeUuRwQAAiAOciKa3UYFw Date: Tue, 2 Jul 2019 13:26:21 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D3FD6C206@IRSMSX103.ger.corp.intel.com> References: <20190528120553.2992-2-lukaszx.krakowiak@intel.com> <20190625153217.24301-1-jasvinder.singh@intel.com> <20190625153217.24301-2-jasvinder.singh@intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E8B8C98@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891268E8B8C98@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODg3OTg5ZTItZmI2NC00ODg0LWEzY2MtNjE0OWYwMjNlNTk0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN20wMk9FVmFMOFwvb24zdGhHUFM2QWhrNkY1dDBpc0pxZDlYanhjS3RqNTU0ZFpqd2VQemdabU5qelRFNnIzRnMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 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 v2 01/28] sched: update macros for flexible config 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Dumitrescu, Cristian > Sent: Monday, July 1, 2019 8:05 PM > To: Singh, Jasvinder ; dev@dpdk.org > Cc: Tovar, AbrahamX ; Krakowiak, LukaszX > > Subject: RE: [PATCH v2 01/28] sched: update macros for flexible config >=20 >=20 >=20 > > -----Original Message----- > > From: Singh, Jasvinder > > Sent: Tuesday, June 25, 2019 4:32 PM > > To: dev@dpdk.org > > Cc: Dumitrescu, Cristian ; Tovar, > > AbrahamX ; Krakowiak, LukaszX > > > > Subject: [PATCH v2 01/28] sched: update macros for flexible config > > > > Update macros to allow configuration flexiblity for pipe traffic > > classes and queues, and subport level configuration of the pipe > > parameters. > > > > Signed-off-by: Jasvinder Singh > > Signed-off-by: Abraham Tovar > > Signed-off-by: Lukasz Krakowiak > > --- > > lib/librte_sched/rte_sched.h | 36 > > +++++++++++++++++++++++++----------- > > 1 file changed, 25 insertions(+), 11 deletions(-) > > > > diff --git a/lib/librte_sched/rte_sched.h > > b/lib/librte_sched/rte_sched.h index 9c55a787d..470a0036a 100644 > > --- a/lib/librte_sched/rte_sched.h > > +++ b/lib/librte_sched/rte_sched.h > > @@ -52,7 +52,7 @@ extern "C" { > > * multiple connections of same traffic class belonging to > > * the same user; > > * - Weighted Round Robin (WRR) is used to service the > > - * queues within same pipe traffic class. > > + * queues within same pipe lowest priority traffic class (best-eff= ort). > > * > > */ > > > > @@ -66,20 +66,32 @@ extern "C" { > > #include "rte_red.h" > > #endif > > > > -/** Number of traffic classes per pipe (as well as subport). > > - * Cannot be changed. > > +/** Maximum number of queues per pipe. > > + * Note that the multiple queues (power of 2) can only be assigned to > > + * lowest priority (best-effort) traffic class. Other higher priority > > +traffic > > + * classes can only have one queue. > > + * Can not change. > > + * > > + * @see struct rte_sched_subport_params > > */ > > -#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE 4 > > +#define RTE_SCHED_QUEUES_PER_PIPE 16 > > > > -/** Number of queues per pipe traffic class. Cannot be changed. */ > > -#define RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS 4 > > +/** Number of WRR queues for best-effort traffic class per pipe. > > + * > > + * @see struct rte_sched_pipe_params > > + */ > > +#define RTE_SCHED_BE_QUEUES_PER_PIPE 8 >=20 > Should we have this as 8 or 4? I think we should limit this to 4, as 4 al= lows quick > vectorization, while 8 is problematic. The only reason to keep 8 queues for best effort TC is flexibility in reduc= ing to 4 if needed, and moreover, it has very little impact on performance = in out tests. =20 > We should also not have a run-time parameter for number of best effort > queues, as this can be detected by checking the size of all best effort q= ueues > against 0. Of course, we should mandate that the enabled queues (with non= - > zero size) are contiguous. Yes, it is done that way without having any additional parameter in public = structure.=20 > > > > -/** Number of queues per pipe. */ > > -#define RTE_SCHED_QUEUES_PER_PIPE \ > > - (RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE * \ > > - RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS) > > +#define RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS 4 > > +/** Number of traffic classes per pipe (as well as subport). > > + * > > + * @see struct rte_sched_subport_params > > + * @see struct rte_sched_pipe_params > > + */ > > +#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE \ > > +(RTE_SCHED_QUEUES_PER_PIPE - RTE_SCHED_BE_QUEUES_PER_PIPE + 1) > > > > -/** Maximum number of pipe profiles that can be defined per port. > > +/** Maximum number of pipe profiles that can be defined per subport. > > * Compile-time configurable. > > */ > > #ifndef RTE_SCHED_PIPE_PROFILES_PER_PORT @@ -95,6 +107,8 @@ > extern > > "C" { > > * > > * The FCS is considered overhead only if not included in the packet > > * length (field pkt_len of struct rte_mbuf). > > + * > > + * @see struct rte_sched_port_params > > */ > > #ifndef RTE_SCHED_FRAME_OVERHEAD_DEFAULT > > #define RTE_SCHED_FRAME_OVERHEAD_DEFAULT 24 > > -- > > 2.21.0