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 8F80BA04C7; Mon, 14 Sep 2020 16:26:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 780061BFC4; Mon, 14 Sep 2020 16:26:21 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9DCD4FFA for ; Mon, 14 Sep 2020 16:26:18 +0200 (CEST) IronPort-SDR: wDblKEDvHnvUdSxqwmsC0EldC5orVyrM6pay+f37uZ4bKyZG/NHSYiAYpc+URNF6/4e/rGQVWq ftQsd08UDeCg== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="156524263" X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="156524263" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 07:26:16 -0700 IronPort-SDR: 7DgCjYv0bIRW7FVR2gY/BBUzdirTmhmzsUTJFi9QMGgLsrVryspetRygPLa6gcAGqBHXlmrWtT aDdR5qr162qQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="343134958" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 14 Sep 2020 07:26:15 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 14 Sep 2020 07:26:14 -0700 Received: from fmsmsx105.amr.corp.intel.com (10.18.124.203) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 14 Sep 2020 07:26:14 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Sep 2020 07:26:14 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 14 Sep 2020 07:26:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kys1L8fCNqip20FYoJFFa+B206K88s0bWLCpwwojV9ir8jYKKgKm8nzQi/PlNZUNdveYAOzA/WgmAjw90GXDpd8Yc6w9Wktfct087B/9lycJYoE03kepiXFmunH5a15hdUy8llFI98RXZAT3gruvYWetpSaOn3bo6YluGvr+2WyZbNOc2gLxPVWrlrWorSB/l9rkb7nAbWY24sOZiwGpJJhDWiCY+tXqKE2AuFoF+qwlga53daI5tAsZ0kK7SbNM97au/IysdY0tTGD963gdtjOunitJNjhYA0x8LSda4bRUItLoVIR9MaKZgAGTC7yx+33WdnM3dpV9DPkn8l0z0g== 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=RqJs8Vnkc7oPwaaLCxkpe0z/H+WRzYRZw/OnKOeUzHg=; b=ZkKqrpn32+ZyHlc86bwf/pDg6Zu/Ir2aHv0+mX4ESCYagCDFbwdaShznRHRMX3NaFYpaz06gjz20iJAWCBGzwJwbDJ3rjQ4kcgTRrtP5UPhKRtTEz1ZSonQrWwS61iFXoxOS8Rpz01fcy9bT588cydiZKnoduOYjSN8l3+vbd/IXoZMSRhLao9WaZTkV8WH3mma2eUynmJg+Zmy0U1B0+thDBlybLOl8FlvBHrnDkOMSV0N988i2yXGboei7BPInf0O9wfv8QkuUnhHksU/y1XzzPMAFDH9VLoJ4NDED+a2sySKBqKUV1PLNAVVM7txKojiCbT9MiQ8Fu9KOPs8MRQ== 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=RqJs8Vnkc7oPwaaLCxkpe0z/H+WRzYRZw/OnKOeUzHg=; b=d7XLPF38eajiSsAkJ6vXY6rrVbC7xmfwyoiHz/HO/XMAQTL7qRjEeVDMPFbyAU8mYeKX0eHz/lsaw9UgTLdSEg/K76zYu/jaU0I7m38jPI1us6qI5r+FykYpGoQ0lNWCKomC5E2jcWKOJk85I5W56N4i43pE5U/3mRa5hgmVS1w= Received: from BYAPR11MB3352.namprd11.prod.outlook.com (2603:10b6:a03:1d::26) by BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.17; Mon, 14 Sep 2020 14:26:12 +0000 Received: from BYAPR11MB3352.namprd11.prod.outlook.com ([fe80::96:1e18:b4ab:1af8]) by BYAPR11MB3352.namprd11.prod.outlook.com ([fe80::96:1e18:b4ab:1af8%6]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 14:26:12 +0000 From: "Singh, Jasvinder" To: "Dharmappa, Savinay" , "Dumitrescu, Cristian" , "dev@dpdk.org" Thread-Topic: [PATCH v2 05/10] sched: update the pipe config api implementation Thread-Index: AQHWh6MOMrHKoLZ1/k2F+ByVGuw+Y6loNjeA Date: Mon, 14 Sep 2020 14:26:12 +0000 Message-ID: References: <1599037006-3931-1-git-send-email-savinay.dharmappa@intel.com> <1599763717-135002-1-git-send-email-savinay.dharmappa@intel.com> <1599763717-135002-6-git-send-email-savinay.dharmappa@intel.com> In-Reply-To: <1599763717-135002-6-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.138.153] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4b5ef02f-0ccc-48ec-0432-08d858ba21d4 x-ms-traffictypediagnostic: BYAPR11MB3301: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:529; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HhTP2AoiQNlPSvTgqw7e7v1FtxPC6NPljNjXW+iTJT2SA/rSNwvvrFXErE7oKRlgNRpMQ1lurEAbghVsTkZUefGRxKAlgM87SANb5b8+jPaeJILtAqvYkZ5TLYJFPi0nI9nWkUJGMXyaSSwFSIzZDyG1l/cb0Q5TbVK+62h9xr3Ddm8KhRRsov63fObTsr78bj2oRO/7fPO2kUPujRpcUUn+RPzevBDtvjjaTtxGWLnwwIq0ouPItqcFB/nuuGhGWTA0Ey5moFhc6Cb+kr8zKZbUewf+lDNYZ7aTLmpZZUKT7GhYsKQ+KqHTpd4Gc64SjSTIGkcKHgzlXi3mk66AWw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3352.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(376002)(366004)(346002)(8676002)(83380400001)(2906002)(64756008)(8936002)(478600001)(71200400001)(33656002)(66446008)(15650500001)(52536014)(53546011)(7696005)(6506007)(9686003)(66476007)(66556008)(66946007)(5660300002)(76116006)(26005)(110136005)(186003)(55016002)(316002)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: xnYHThovotvr7x137g9kEn6j7dLJYDfc7NPQVrhsniyFXscu/Fl/No7NNPqkaz0Ui2MzYo2EG9tJeDYj8bJyX51DdLfVlJDvDbbHbI4/CIeOqww1RbSDSKMYJRdqXiYUWnQJ1IhSVJbcWXdsUxbB37coHQBFN1t1VWS82ggfJm+LH1FDsI9pXJFmI24CpD1N5JS+aqCe/zv3hKvmH4yzu8VkJBVJ6OejebS8bucEOBvypfF6tYCOmj0oTNxW8q1hZMC/31IwRS3yZSmhTaaJmSF5rFYKST+NrgxOk0Rgy59nXTm9++qN+B3tZvq5NI3au8otY2lQVLQfYDYINSOMEazM607s75xiYDLqfZUUfjY12NLFwp0B47vySzSVKnTAR5pSNf6OfcVoGYcx/EyQA0Zooc81tEapD+BtLaMcfGJrzihq46xFN6QWfquuF3LA372rXceLs8BxlWTPmu46dvp5JCHamTrzr5vwTVUsX0qw8KJ4YKUY/UO4SQH1jic2D+jWTSJEYVGAjsK0KkgahqYHx+OwzT0Om+XP9RbunKCUuc1/A+jJlXxYbJ4Cz7ZxQijvN6olwAGRPV3z3TPAOZNAn/8Yu/t8hW8Qck7lBu6/u9Gz+dh4ZDlW+EBmF3z98d7egBBr5mkQ4BXlvJBPOQ== 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: BYAPR11MB3352.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b5ef02f-0ccc-48ec-0432-08d858ba21d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2020 14:26:12.6669 (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: p6urcHq+wDRvWMvh/OUXS0hqrEbbC8pAAplaMEiMVNjw2M6XDVb7BesR9VaJQUJEgJzSWkikxdkawu7RWVcLvp2OSZMM7nHwZnKsAarCVu4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3301 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 05/10] sched: update the pipe config api implementation 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: Thursday, September 10, 2020 7:49 PM > To: Singh, Jasvinder ; Dumitrescu, Cristian > ; dev@dpdk.org > Cc: Dharmappa, Savinay > Subject: [PATCH v2 05/10] sched: update the pipe config api implementatio= n >=20 > Subport profile parameters are fetched from subport profile table to > calculate the subport best effort tc rate. >=20 > Signed-off-by: Savinay Dharmappa > Signed-off-by: Jasvinder Singh > --- > lib/librte_sched/rte_sched.c | 40 +++++++++++++++++++++-----------------= -- > 1 file changed, 21 insertions(+), 19 deletions(-) >=20 > diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c = index > 8e66d08..9ff67e0 100644 > --- a/lib/librte_sched/rte_sched.c > +++ b/lib/librte_sched/rte_sched.c > @@ -1403,6 +1403,7 @@ rte_sched_pipe_config(struct rte_sched_port > *port, > int32_t pipe_profile) > { > struct rte_sched_subport *s; > + struct rte_sched_subport_profile *sp; > struct rte_sched_pipe *p; > struct rte_sched_pipe_profile *params; > uint32_t n_subports =3D subport_id + 1; > @@ -1443,14 +1444,15 @@ rte_sched_pipe_config(struct rte_sched_port > *port, > return -EINVAL; > } >=20 > + sp =3D port->subport_profiles + s->profile; > /* Handle the case when pipe already has a valid configuration */ > p =3D s->pipe + pipe_id; > if (p->tb_time) { > params =3D s->pipe_profiles + p->profile; >=20 > double subport_tc_be_rate =3D > - (double) s- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > - / (double) s->tc_period; > + (double)sp- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > + / (double) sp->tc_period; > double pipe_tc_be_rate =3D > (double) params- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > / (double) params->tc_period; > @@ -1492,8 +1494,8 @@ rte_sched_pipe_config(struct rte_sched_port > *port, > { > /* Subport best effort tc oversubscription */ > double subport_tc_be_rate =3D > - (double) s- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > - / (double) s->tc_period; > + (double)sp- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > + / (double) sp->tc_period; > double pipe_tc_be_rate =3D > (double) params- > >tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > / (double) params->tc_period; > @@ -2286,11 +2288,11 @@ grinder_credits_update(struct rte_sched_port > *port, > uint32_t i; >=20 > /* Subport TB */ > - n_periods =3D (port->time - subport->tb_time) / sp_params- > >sp_tb_period; > - subport->tb_credits +=3D n_periods * sp_params- > >sp_tb_credits_per_period; > + n_periods =3D (port->time - subport->tb_time) / sp_params- > >tb_period; > + subport->tb_credits +=3D n_periods * sp_params- > >tb_credits_per_period; > subport->tb_credits =3D RTE_MIN(subport->tb_credits, > - sp_params->sp_tb_size); > - subport->tb_time +=3D n_periods * sp_params->sp_tb_period; > + sp_params->tb_size); > + subport->tb_time +=3D n_periods * sp_params->tb_period; >=20 > /* Pipe TB */ > n_periods =3D (port->time - pipe->tb_time) / params->tb_period; @@ - > 2302,9 +2304,9 @@ grinder_credits_update(struct rte_sched_port *port, > if (unlikely(port->time >=3D subport->tc_time)) { > for (i =3D 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) > subport->tc_credits[i] =3D > - sp_params- > >sp_tc_credits_per_period[i]; > + sp_params->tc_credits_per_period[i]; >=20 > - subport->tc_time =3D port->time + sp_params->sp_tc_period; > + subport->tc_time =3D port->time + sp_params->tc_period; > } >=20 > /* Pipe TCs */ > @@ -2333,17 +2335,17 @@ grinder_tc_ov_credits_update(struct > rte_sched_port *port, > return subport->tc_ov_wm_max; >=20 > for (i =3D 0; i < RTE_SCHED_TRAFFIC_CLASS_BE; i++) { > - tc_ov_consumption[i] =3D sp_params- > >sp_tc_credits_per_period[i] > + tc_ov_consumption[i] =3D sp_params->tc_credits_per_period[i] > - subport->tc_credits[i]; > tc_consumption +=3D tc_ov_consumption[i]; > } >=20 > tc_ov_consumption[RTE_SCHED_TRAFFIC_CLASS_BE] =3D > - sp_params- > >sp_tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] - > + sp_params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > - > subport->tc_credits[RTE_SCHED_TRAFFIC_CLASS_BE]; >=20 > tc_ov_consumption_max =3D > - sp_params- > >sp_tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] - > + sp_params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] > - > tc_consumption; >=20 > if (tc_ov_consumption[RTE_SCHED_TRAFFIC_CLASS_BE] > @@ - > 2374,11 +2376,11 @@ grinder_credits_update(struct rte_sched_port *port, > uint32_t i; >=20 > /* Subport TB */ > - n_periods =3D (port->time - subport->tb_time) / sp_params- > >sp_tb_period; > - subport->tb_credits +=3D n_periods * sp_params- > >sp_tb_credits_per_period; > + n_periods =3D (port->time - subport->tb_time) / sp_params- > >tb_period; > + subport->tb_credits +=3D n_periods * sp_params- > >tb_credits_per_period; > subport->tb_credits =3D RTE_MIN(subport->tb_credits, > - sp_params->sp_tb_size); > - subport->tb_time +=3D n_periods * sp_params->sp_tb_period; > + sp_params->tb_size); > + subport->tb_time +=3D n_periods * sp_params->tb_period; >=20 > /* Pipe TB */ > n_periods =3D (port->time - pipe->tb_time) / params->tb_period; @@ - > 2393,9 +2395,9 @@ grinder_credits_update(struct rte_sched_port *port, >=20 > for (i =3D 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) > subport->tc_credits[i] =3D > - sp_params->sp_tc_credits_per_period[i]; > + sp_params->tc_credits_per_period[i]; >=20 > - subport->tc_time =3D port->time + sp_params->sp_tc_period; > + subport->tc_time =3D port->time + sp_params->tc_period; > subport->tc_ov_period_id++; > } >=20 > -- > 2.7.4 Looks like the above changes have already been done in the last patch of th= is series. Please check.