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 76507A0549; Thu, 16 Jul 2020 10:14:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A71D1BEC0; Thu, 16 Jul 2020 10:14:48 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DD6221BEA8 for ; Thu, 16 Jul 2020 10:14:46 +0200 (CEST) IronPort-SDR: o50atxDWx9ULlt8LRgDy7K0tOKB+Q/qT/o6jWNIi7NFeen3z+jXur67qjqEDgcVNmfWaYEKTjN B3GfWybRW7pg== X-IronPort-AV: E=McAfee;i="6000,8403,9683"; a="210870488" X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="210870488" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 01:14:46 -0700 IronPort-SDR: W4TMnn3W+zu9dtI7JnN7MYdMevm+Wn1hPs0v5WLSqCKjpyCrmnXJLxzqYk+/YfqQKyjO5dtw5J h4OJiAs18DRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="300175395" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 16 Jul 2020 01:14:45 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:14:45 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:14:45 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:14:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gFqbWO+zlZic2rtSWHyHkUa4ppagXOEbM/iBKa2dyk5VLQYvQKxohldtfdGf5q+m+ckcPFNhZn2tAYkNZjcUGD698sohjUlUp6MLWoaGazxeZHl/QKDG2F2tNKjXtLN17DD7myeDe1I/NXwv8Md/oH/NKS+Bt20Q5GnTL0Y0QLFa2fTPmVZs19uQ8NLEOas1VrMR8hXbbUeZq8h0KeTqN3PgrLrdGsTf9B0gbZIYMtjaWi8g+pHtiyT9r3TIe9e9X6JULfelrnnkNyZqqjwHHdbUjkSOtgpXbPFGVcFCNBcxinkATEykHRHifJ5DUSvff38VarC8ayac97dh5uk/2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2TewnuEqAmVoSsBrHkC1zPdb4jaJ2ozwHTV87IUFBpc=; b=e+ET0L8xS8lRNLCedWZlN+gi+HXVyKsiSEYM5aXoREo8rKM1DTmDit6Elf/eQYqKpdOmdWpjJwu7zBJjtMCSzmZ6fzX8Bf/9QSV2Mz4+E2lTURW6RLZ/aq3zsgeqhZK0iB5daGfk8tCJEbl6e+rj3GC1JnR8AGwVcqaKzMh0ITAGUHJLjSLFKGchQHGquXMoeILuIdKNolTe5XTnJDo84LWLmM7xostki993XoBd4auVeXHc4bOj/Bex7Eg50BtlPZV/44I/AZgIXt8Q4jtT5yOO2SB7q9+VjAU9l/DVv4NKuspBgbbwKMN+4u8svZ6wkFWyS2r82wh9p15/+oOV2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2TewnuEqAmVoSsBrHkC1zPdb4jaJ2ozwHTV87IUFBpc=; b=w/Oz9GtDmlg424ZARUg9cTt/KFtkd8qnW0M7PcEpkQZ1tMAtKzvxa2tudokAORgJOlC2pKyXV6TMWGAw+B3leiY/G1m1qUPK7jk+dgJdJeKPnMUuD4CIeLbiCC0sGtWCc7TtaY6bu9YPscSI2avyjHZbyejLYyfWRmSwxuw5o4A= Received: from CY4PR11MB0072.namprd11.prod.outlook.com (2603:10b6:910:76::27) by CY4PR11MB0069.namprd11.prod.outlook.com (2603:10b6:910:79::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Thu, 16 Jul 2020 08:14:44 +0000 Received: from CY4PR11MB0072.namprd11.prod.outlook.com ([fe80::e979:a537:4a97:afd5]) by CY4PR11MB0072.namprd11.prod.outlook.com ([fe80::e979:a537:4a97:afd5%5]) with mapi id 15.20.3195.018; Thu, 16 Jul 2020 08:14:44 +0000 From: "Singh, Jasvinder" To: "Dharmappa, Savinay" , "dev@dpdk.org" , "Dumitrescu, Cristian" Thread-Topic: [RFC PATCH 2/2] example/qos_sched: subport bandwidth profile config Thread-Index: AQHWWtXFiw/ZyJUCP0q95PFjjlYv0qkJ3JXg Date: Thu, 16 Jul 2020 08:14:44 +0000 Message-ID: References: <1594837677-313175-1-git-send-email-savinay.dharmappa@intel.com> <1594837677-313175-3-git-send-email-savinay.dharmappa@intel.com> In-Reply-To: <1594837677-313175-3-git-send-email-savinay.dharmappa@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [51.37.210.122] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c7045f46-6228-4bbe-e20b-08d829604c0b x-ms-traffictypediagnostic: CY4PR11MB0069: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: izVWyY+mxltMRvyM/c+DozmnNYGKtqC+MYMPTPWFoZTcz3uZaXN2dtcAEAznrR3Gufk8Gok3GLid9w/5vTuDFpUD+UTr/x9+P93nViRSXnQIOU6Rtf9KxqX3YsazlnodQxrzlQ0c4sPk+Bk2C3L8ylxGAYJR57vTSdGeHCkgsW5dViIyA9atCDL3qp3uiLrM4peY0dPKs0ToKC3IOjrevMvmxINJ6yhTtVpFsFvsdpSHQo5TKiPO1TqpXD1H1bBaEGB4BWCHSmcx8M3JWqykg2YkHVUQHHqovQwSxqXSDWn+E3dfcfl6ZheV6LRrFbB2 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB0072.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(39860400002)(396003)(376002)(136003)(8936002)(186003)(33656002)(478600001)(110136005)(7696005)(76116006)(53546011)(6506007)(26005)(66476007)(64756008)(66946007)(66446008)(316002)(2906002)(66556008)(30864003)(55016002)(52536014)(86362001)(9686003)(71200400001)(8676002)(5660300002)(83380400001)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 5MMcskV8CR2ma1GTRxwiTanCARdAJASm8ChRTUY5m1eTh7C5kuPdL7oLszfjKr6gI9UG7Xbfrgo+ZlQi00WuWXfaD3fjd773dDOMPWSQrIjKvL2dzGTopD1zhPvNI2kGCMs3+2TsS+MqAMuJAK8bmnv8k+zcfjj2FETInBG0Dy58rTMdCJapP2wySmntd1cdrXnFNKZhRM7m1f7iXcdduOW3Nqm92hcnjBkQ7DUmTuDxCirViPAdupXwg8BZjTBPWszXuzVdTfGzSFOYsXBc6KzSScJKjm1PoxFQF9YU2yHIO8UhiLTnlL7uKI5LxEcAycaaYfS1zmDkJDx0Q0Ua2MazRD/Cz5Zy/EzMolWZNZ/3IDZ+VZdYQGfP91JSoiSeGIkwAbcVS8ugMgD2aEW0yt6Sp0bQGTF1Bk5ZhbYp0MIiNNJJPWahX85CTbTIS+KaJknyN4jIvp6CTSWiaQfkAkkoYnPZCjBA1Er25x0fSHs= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB0072.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7045f46-6228-4bbe-e20b-08d829604c0b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2020 08:14:44.1332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xM0caC5Spn1mxPsKCBFnjrlS7qOLVe/REcuvZDtO5t6yrXo48ylMUFIXq+jFL14szUr5Zp3uuM6yxCv4aJeqPsA2NjHwKFLOYnOln4KN/dw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB0069 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC PATCH 2/2] example/qos_sched: subport bandwidth profile 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: Dharmappa, Savinay > Sent: Wednesday, July 15, 2020 7:28 PM > To: Dharmappa, Savinay ; Singh, Jasvinder > ; dev@dpdk.org > Subject: [RFC PATCH 2/2] example/qos_sched: subport bandwidth profile > config >=20 > qos sched application uses the new apis introduced as part of dynamic > configuration of subport bandwidth to configure the deafult subport > bandwidth profile while buidling the hirerachical scheduler. >=20 > Signed-off-by: Savinay Dharmappa > Signed-off-by: Jasvinder Singh > --- > examples/qos_sched/cfg_file.c | 158 ++++++++++++++++++++++++-----------= -- > ---- > examples/qos_sched/cfg_file.h | 4 ++ > examples/qos_sched/init.c | 24 +++++-- > examples/qos_sched/main.h | 1 + > examples/qos_sched/profile.cfg | 3 + > 5 files changed, 120 insertions(+), 70 deletions(-) >=20 > diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.= c > index f078e4f..9e1341c 100644 > --- a/examples/qos_sched/cfg_file.c > +++ b/examples/qos_sched/cfg_file.c > @@ -53,8 +53,11 @@ cfg_load_pipe(struct rte_cfgfile *cfg, struct > rte_sched_pipe_params *pipe_params > if (!cfg || !pipe_params) > return -1; >=20 > - profiles =3D rte_cfgfile_num_sections(cfg, "pipe profile", sizeof("pipe > profile") - 1); > - subport_params[0].n_pipe_profiles =3D profiles; > + profiles =3D rte_cfgfile_num_sections(cfg, "pipe profile", > + sizeof("pipe profile") - 1); > + port_params.n_subport_profiles =3D profiles; > + > + printf(" profiles =3D %d", profiles); >=20 > for (j =3D 0; j < profiles; j++) { > char pipe_name[32]; > @@ -143,6 +146,93 @@ cfg_load_pipe(struct rte_cfgfile *cfg, struct > rte_sched_pipe_params *pipe_params } >=20 > int > +cfg_load_subport_profile(struct rte_cfgfile *cfg, > + struct rte_sched_subport_profile_params *subport_profile) { > + int i; > + const char *entry; > + int profiles; > + > + if (!cfg || !subport_profile) > + return -1; > + > + profiles =3D rte_cfgfile_num_sections(cfg, "subport profile", > + sizeof("subport profile") - 1); > + subport_params[0].n_pipe_profiles =3D profiles; > + > + for (i =3D 0; i < profiles; i++) { > + char sec_name[32]; > + snprintf(sec_name, sizeof(sec_name), "subport profile %d", > i); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tb rate"); > + if (entry) > + subport_profile[i].tb_rate =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tb size"); > + if (entry) > + subport_profile[i].tb_size =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc period"); > + if (entry) > + subport_profile[i].tc_period =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 0 rate"); > + if (entry) > + subport_profile[i].tc_rate[0] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 1 rate"); > + if (entry) > + subport_profile[i].tc_rate[1] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 2 rate"); > + if (entry) > + subport_profile[i].tc_rate[2] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 3 rate"); > + if (entry) > + subport_profile[i].tc_rate[3] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 4 rate"); > + if (entry) > + subport_profile[i].tc_rate[4] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 5 rate"); > + if (entry) > + subport_profile[i].tc_rate[5] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 6 rate"); > + if (entry) > + subport_profile[i].tc_rate[6] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 7 rate"); > + if (entry) > + subport_profile[i].tc_rate[7] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 8 rate"); > + if (entry) > + subport_profile[i].tc_rate[8] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 9 rate"); > + if (entry) > + subport_profile[i].tc_rate[9] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 10 rate"); > + if (entry) > + subport_profile[i].tc_rate[10] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 11 rate"); > + if (entry) > + subport_profile[i].tc_rate[11] =3D (uint64_t)atoi(entry); > + > + entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 12 rate"); > + if (entry) > + subport_profile[i].tc_rate[12] =3D (uint64_t)atoi(entry); > + } > + > + return 0; > +} > + > +int > cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_param= s > *subport_params) { > const char *entry; > @@ -267,70 +357,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct > rte_sched_subport_params *subpo > } > } >=20 > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tb > rate"); > - if (entry) > - subport_params[i].tb_rate =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tb > size"); > - if (entry) > - subport_params[i].tb_size =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc > period"); > - if (entry) > - subport_params[i].tc_period =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 0 > rate"); > - if (entry) > - subport_params[i].tc_rate[0] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 1 > rate"); > - if (entry) > - subport_params[i].tc_rate[1] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 2 > rate"); > - if (entry) > - subport_params[i].tc_rate[2] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 3 > rate"); > - if (entry) > - subport_params[i].tc_rate[3] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 4 > rate"); > - if (entry) > - subport_params[i].tc_rate[4] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 5 > rate"); > - if (entry) > - subport_params[i].tc_rate[5] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 6 > rate"); > - if (entry) > - subport_params[i].tc_rate[6] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 7 > rate"); > - if (entry) > - subport_params[i].tc_rate[7] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 8 > rate"); > - if (entry) > - subport_params[i].tc_rate[8] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 9 > rate"); > - if (entry) > - subport_params[i].tc_rate[9] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 10 > rate"); > - if (entry) > - subport_params[i].tc_rate[10] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 11 > rate"); > - if (entry) > - subport_params[i].tc_rate[11] =3D > (uint64_t)atoi(entry); > - > - entry =3D rte_cfgfile_get_entry(cfg, sec_name, "tc 12 > rate"); > - if (entry) > - subport_params[i].tc_rate[12] =3D > (uint64_t)atoi(entry); > - > int n_entries =3D rte_cfgfile_section_num_entries(cfg, > sec_name); > struct rte_cfgfile_entry entries[n_entries]; >=20 > diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.= h > index 2eccf1c..0dc458a 100644 > --- a/examples/qos_sched/cfg_file.h > +++ b/examples/qos_sched/cfg_file.h > @@ -14,4 +14,8 @@ int cfg_load_pipe(struct rte_cfgfile *cfg, struct > rte_sched_pipe_params *pipe); >=20 > int cfg_load_subport(struct rte_cfgfile *cfg, struct > rte_sched_subport_params *subport); >=20 > +int cfg_load_subport_profile(struct rte_cfgfile *cfg, > + struct rte_sched_subport_profile_params > + *subport_profile); > + > #endif > diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index > 9626c15..541adb7 100644 > --- a/examples/qos_sched/init.c > +++ b/examples/qos_sched/init.c > @@ -196,15 +196,20 @@ static struct rte_sched_pipe_params > pipe_profiles[MAX_SCHED_PIPE_PROFILES] =3D { > }, > }; >=20 > -struct rte_sched_subport_params > subport_params[MAX_SCHED_SUBPORTS] =3D { > +static struct rte_sched_subport_profile_params > + subport_profile[MAX_SCHED_SUBPORT_PROFILES] =3D { > { > .tb_rate =3D 1250000000, > .tb_size =3D 1000000, > - > .tc_rate =3D {1250000000, 1250000000, 1250000000, > 1250000000, > 1250000000, 1250000000, 1250000000, 1250000000, > 1250000000, > 1250000000, 1250000000, 1250000000, 1250000000}, > .tc_period =3D 10, > + }, > +}; > + > +struct rte_sched_subport_params > subport_params[MAX_SCHED_SUBPORTS] =3D { > + { > .n_pipes_per_subport_enabled =3D 4096, > .qsize =3D {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, > .pipe_profiles =3D pipe_profiles, > @@ -289,6 +294,9 @@ struct rte_sched_port_params port_params =3D { > .mtu =3D 6 + 6 + 4 + 4 + 2 + 1500, > .frame_overhead =3D RTE_SCHED_FRAME_OVERHEAD_DEFAULT, > .n_subports_per_port =3D 1, > + .n_subport_profiles =3D 1, > + .subport_profiles =3D subport_profile, > + .n_max_subport_profiles =3D MAX_SCHED_SUBPORT_PROFILES, > .n_pipes_per_subport =3D MAX_SCHED_PIPES, }; >=20 > @@ -320,8 +328,15 @@ app_init_sched_port(uint32_t portid, uint32_t > socketid) > for (subport =3D 0; subport < port_params.n_subports_per_port; > subport ++) { > err =3D rte_sched_subport_config(port, subport, > &subport_params[subport]); > if (err) { > - rte_exit(EXIT_FAILURE, "Unable to config sched > subport %u, err=3D%d\n", > - subport, err); > + rte_exit(EXIT_FAILURE, "Unable to config schedi " > + "subport %u, err=3D%d\n", subport, err); > + } > + > + err =3D rte_sched_subport_profile_config(port, subport, 0); > + if (err) { > + rte_exit(EXIT_FAILURE, "failed to configure " > + "profile err=3D%d\n", err); > + > } >=20 > uint32_t n_pipes_per_subport =3D > @@ -354,6 +369,7 @@ app_load_cfg_profile(const char *profile) >=20 > cfg_load_port(file, &port_params); > cfg_load_subport(file, subport_params); > + cfg_load_subport_profile(file, subport_profile); > cfg_load_pipe(file, pipe_profiles); >=20 > rte_cfgfile_close(file); > diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h > index 23bc418..0d6815a 100644 > --- a/examples/qos_sched/main.h > +++ b/examples/qos_sched/main.h > @@ -51,6 +51,7 @@ extern "C" { > #define MAX_SCHED_SUBPORTS 8 > #define MAX_SCHED_PIPES 4096 > #define MAX_SCHED_PIPE_PROFILES 256 > +#define MAX_SCHED_SUBPORT_PROFILES 8 >=20 > #ifndef APP_COLLECT_STAT > #define APP_COLLECT_STAT 1 > diff --git a/examples/qos_sched/profile.cfg > b/examples/qos_sched/profile.cfg index 61b8b70..4486d27 100644 > --- a/examples/qos_sched/profile.cfg > +++ b/examples/qos_sched/profile.cfg > @@ -26,6 +26,9 @@ number of subports per port =3D 1 number of pipes per > subport =3D 4096 queue sizes =3D 64 64 64 64 64 64 64 64 64 64 64 64 64 >=20 > +subport 0-8 =3D 0 ; These subports are configured with su= bport profile > 0 > + > +[subport profile 0] > tb rate =3D 1250000000 ; Bytes per second > tb size =3D 1000000 ; Bytes >=20 > -- > 2.7.4 + Cristian