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 98DD0A04B8; Wed, 2 Sep 2020 12:47:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E721DDE0; Wed, 2 Sep 2020 12:47:00 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 16F63255 for ; Wed, 2 Sep 2020 12:46:58 +0200 (CEST) IronPort-SDR: C7OK3RO0RyUp5yUKRUBuF4L6f29ndtDF9AXVXjqSXehtYive56lmiw5i6EvlDy0IIMULS4qs04 /fAKQs78/MOw== X-IronPort-AV: E=McAfee;i="6000,8403,9731"; a="175412989" X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="175412989" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 03:46:56 -0700 IronPort-SDR: SZQuISf44Jf5i2FZYqq3QeqQsdUrkwqrG6bx0c8aOPnHQGMXAAsRwRIXLq6TvTWOEfhKg8FEbM JOJvs/YG/JMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="282273398" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 02 Sep 2020 03:46:55 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 2 Sep 2020 03:46:55 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 2 Sep 2020 03:46:54 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Sep 2020 03:46:54 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 2 Sep 2020 03:46:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dc3aKgGd71/IQT9iPaigPVOCc/NDOt6iwr45d2cPLREkbWTNuk0x2QNkLtbuTD7nfM4lNSE8VAx4DXL9ywwhbzAwsoFKzM/uYclgF64Ul8mSmduWfsO2ho8x6xByqPGLMddw4MXs/CrUKDdbBx5ko8YwrlL0ZsD8740Y2/HlEBXUHg8ptx60iBdVKDOM+LaAAkA26UdhEwFn0Uk4y1CdBJCzCQvK1XXUSfobl7+FQrLNZL5XjcmN0FDcBD5wTtaGUVW8krFHgyvXnBZnRdXvPj5vM0YsHa4Nkm1Hf+AthZbN8J5RkMKxSLiZXSthzVfkXro6rhn1BKatfDgHQASmVA== 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=m5dRDn08tjasw73+M4of5saGXQNbQX7u1NxqVWvhMeU=; b=EWPmIlRTk607f0dqYaNVsmtfluvmOsiuBKgRqfDA3Wgtr3j1oQx1/w2NPa999fw+W5FyU7OhVpLQ7HxTMo8TqwVyntIa8KfCWFl+OV96YDGdHsHVo1Cx+9SPJKS/o+Eg8df8KaPxUj2h4StY+5ETM396BNXnc7trsZ7/lEQx0iW6+Y7AOW2aRfWwL0ZJV7VeR3gtfq4iHeJIGa1hIQnjzjUu023rlJ89LfxpvTq6Dhfx9Mg1n9OREq+YlN0XHoW40ubvXz9pdrwsAT4FzYb0jmkdvuvopHfswA9RvH4DVCUpLRhz8PuALLNMOD4YGN5pbZfqBINvCB1ZDGLKesXy7Q== 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=m5dRDn08tjasw73+M4of5saGXQNbQX7u1NxqVWvhMeU=; b=icqFwsycZajKaVRAzSJciQPgU0y6aooOTfcUf9Ej0T8B43SDSpmMJIA25BaRBNrrFhTRB+8EnMAAsfTc96pgrOVrR6gEpiOJ8zWCaE9ZP0iw5UsNOiNrOItwQ8NjiZZkc5oxok3rsA7Ga1SZYoKglceRboOTb83u03EtJuJjLU8= Received: from BL0PR11MB3491.namprd11.prod.outlook.com (2603:10b6:208:33::30) by MN2PR11MB4448.namprd11.prod.outlook.com (2603:10b6:208:193::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.24; Wed, 2 Sep 2020 10:46:52 +0000 Received: from BL0PR11MB3491.namprd11.prod.outlook.com ([fe80::5544:e199:3d48:6dbe]) by BL0PR11MB3491.namprd11.prod.outlook.com ([fe80::5544:e199:3d48:6dbe%4]) with mapi id 15.20.3348.015; Wed, 2 Sep 2020 10:46:52 +0000 From: "Dharmappa, Savinay" To: "Dumitrescu, Cristian" , "Singh, Jasvinder" , "dev@dpdk.org" Thread-Topic: [PATCH v1 1/4] example/qos_sched: subport bandwidth dynmaic conf Thread-Index: AQHWgQiCHdLfEYxD+Eydb8koxJe326lVKgKg Date: Wed, 2 Sep 2020 10:46:52 +0000 Message-ID: References: <1594837677-313175-3-git-send-email-savinay.dharmappa@intel.com> <1599037631-199836-1-git-send-email-savinay.dharmappa@intel.com> In-Reply-To: <1599037631-199836-1-git-send-email-savinay.dharmappa@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 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: [122.172.168.32] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a9646575-bb96-4ecb-c90d-08d84f2d809e x-ms-traffictypediagnostic: MN2PR11MB4448: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jSWHNc9Enw93SrMeUCG3x2eQEo+qAlVOBbBkizz17WiVzSEbD5xddHcdBep8GRC3lh8aUmurDxGS3vSv5g0ln04HBK0kNuElezEwJ3PLzlUJ4NSMil881CmX71D0rhxbInO4geE554iKfyR5FmqaxasCE8mInVXebdLh9tJ17VwIhGp8l4ZPFrxuT59d/8uQsNWca/YQoPLa4oxm1qFlpGPgTi0AItGtahCEolT2ZR6jKXIp7eKeXt5/AhMBFKkVfC0wdYswcATOQJ+tgzDmcLZL951K7ifWS6qKiHS5ir7BcsNHAAceUwl5/rMY/aXC x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(39860400002)(366004)(376002)(8676002)(26005)(83380400001)(66946007)(2906002)(76116006)(66446008)(71200400001)(55236004)(316002)(5660300002)(64756008)(66476007)(186003)(66556008)(52536014)(86362001)(110136005)(55016002)(478600001)(6506007)(53546011)(8936002)(7696005)(33656002)(30864003)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 1QqEkvJ0zE1sNopEbNmY+6OU0ry43f49onXj/w7EeaPWfgUAWagYOefqw9fN+tvJy6krI3sKWhRN9ApF7ydHjDGUdBrEVNLfaX+l+wDQAF90e/xb6c7IlBSZMR7tk/Z8JAco8u6aN9VRDx2rvhaJiYDrfqMbhN1UhjsjUH5XoVmeCIf1UOqq57CBWE2VJTEMn0qzwjMeVSCCbhplfxKJ47cucf1TWYdAulOeJJmEKl8wTipSIMfyZiOzEgz3kOBZXouyqKIWaafZ4pZwln/rbQ8T1mLnbWlkANdZ1XvvPn5AZidZ262v8/KVym9m0NKa9CsWXLluyC2E/0wB/vweaZ7lEdfua3vwVpOeN2AiixCyHGzxg6n4AZBytKEkDv24pdx54jjnF7R56JgK2f1GJcc1yVWK7oRvgLfwskr9FVqCTl50Z+proMMy/d6jfscRHj58kjsPwrtkqzratAWWCDYk/cVCmq/4qiiPC6M12r4Q2ZnPAM6BbNpzUe/iOf2BSeFcakyzxMj0GW2eSt/PffcznuL1+xLKMC0dSZW/LmGeAZpbxaJb2GJ8xyB4WtpWaRCpZ3QK7KCANVKOx1k8ZYWzgfBEWn857fxg94yaqZH0fWNqFwdUmKkfmDBMgneS9P+X4GkJqBx0Zw0TT4HV0Q== 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: BL0PR11MB3491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9646575-bb96-4ecb-c90d-08d84f2d809e X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2020 10:46:52.1858 (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: UX7EkpQUWGENRSLBgSToFFs6923xbsWOkEe08P1GbVhoINvcAUTqq1FK6gPYXR7VvS5pVbyisP+SClIzOv0QRiTgupfE9DkwiDf62yLV1Uk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4448 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1 1/4] example/qos_sched: subport bandwidth dynmaic conf 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" Self NACK the patch. As I would like to merge the application series change= s of patch with previous sent library changes patches series and have singl= e patch series. Regards savinay -----Original Message----- From: Dharmappa, Savinay =20 Sent: Wednesday, September 2, 2020 2:37 PM To: Dumitrescu, Cristian ; Singh, Jasvinder = ; dev@dpdk.org Cc: Dharmappa, Savinay Subject: [PATCH v1 1/4] example/qos_sched: subport bandwidth dynmaic conf qos sched application uses the new apis introduced as part of dynamic confi= guration of subport bandwidth to configure the deafult subport bandwidth pr= ofile while buidling the hirerachical scheduler. Signed-off-by: Savinay Dharmappa --- 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(-) 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 p= rofile") - 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_sche= d_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_params = *subport_params) { const char *entry; @@ -267,70 +357,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_s= ched_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_sch= ed_pipe_params *pipe); =20 int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_par= ams *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 96= 26c15..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 23= bc418..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.cf= g 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 su= bport =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 subp= ort profile 0 + +[subport profile 0] tb rate =3D 1250000000 ; Bytes per second tb size =3D 1000000 ; Bytes =20 -- 2.7.4