From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97029A0543; Thu, 7 Jul 2022 15:07:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69315406B4; Thu, 7 Jul 2022 15:07:14 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4515B4069D for ; Thu, 7 Jul 2022 15:07:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657199232; x=1688735232; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vNJ5Ox2XXcRFu4ynhon3RjNlQ8GEiu9LzEppoQzoDA8=; b=nVMFgoSof0kjYVL9gCfXnfEvsV99g3wjPHPeK9uhYaEta/OQSRuBhMF0 tRkoIMtikXDDi0/wJmTdXpD8h6PbkCXhXoG1sr5TtSU6+WIT++c6oZWbO H1AWJ7iYlbNNsHqziv9ROy+TuW64G/HXKlj8BUBCCjV2YCrkg0zFe9mr9 NB0YR1C5kCAhCr0rpK+VTXMJTWehnSCROJwTP/r8J3v4cxOzBfIdgQ07D uKEEkw7+QukVIEa4l0IS3BWZ9HSskOm0e1ZxsilNSCzup9J0a8re0YAhl q2gCUY2OBCxILYaK4YrbLywTdiITNrmD4PIO2orxc3tlaxMGgC+dwjLdq g==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="370335348" X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="370335348" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 06:07:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="920583147" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 07 Jul 2022 06:07:10 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 06:07:10 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 06:07:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2308.27 via Frontend Transport; Thu, 7 Jul 2022 06:07:10 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 7 Jul 2022 06:07:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gD5LgVuAM7stoUN9kim4/VE/o96BghpOIOIupB3nmj6CHXPZZ3MeUwaLZOb7U1L2iP6oz9+8NMR1b3+vTfLw7kaU23eI9Ew7ul6TRkB+lBKw2qeRwdjaJCvgR/npCBk0TzHmePJi4jwqGx42K/2XPiD7k4FlcVnAJAC9Qeghd0JaJ2tTMX7XMGwCL+TEfIZPSxb+9eHkgO6hL9Aut6t470RZTaPJx4RB5UX/EjD4wzBNDOGgx57BrkU7bQilEXJgPdlCviVkaV4yL2miO9GEGwJvwUuym8E4Hrc/HBGffOBlyJE/ATPNWRzrhYX1E4XO3m9pIVE4PuK+IxYkIlfvFQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=umvuUOgMF/1WFlGb5/+yBEvmmXzSmh6vRK7pgz/wCnM=; b=lXtHiERqIsJoCEm5t7mMOdw9mJfWpFFPjCLMI5FUW2unKdIkUywjUCprLcyZfy7I4N/G4aa6TUTR+pFvB8eKG9wqH82oGcItj76WaZY3xl9TS/ywDzTEHJmImXCbw9M7hliLzF6p+m8JcQj+xyy6lC3chMNyodILTgoMdFb/0B4cPceqyKauzwrKrYUS+c0ks3RxzGAiUHH36OGNv1vV5QasG7p+lh2yVMXYo3cUnLkgCpc6MNYbP6BlwwaGtfSkrVVhyK3WYt8QTTJ/IQe3IilNmWlbBRYTvwLZsCTUz2ygq/v5uUEPw65EU8acBjPrml6qh/D0TH3z1E9oMR+nmg== 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 Received: from PH0PR11MB5784.namprd11.prod.outlook.com (2603:10b6:510:129::22) by MN2PR11MB3824.namprd11.prod.outlook.com (2603:10b6:208:f4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Thu, 7 Jul 2022 13:07:08 +0000 Received: from PH0PR11MB5784.namprd11.prod.outlook.com ([fe80::a46c:7c4e:dead:27e6]) by PH0PR11MB5784.namprd11.prod.outlook.com ([fe80::a46c:7c4e:dead:27e6%3]) with mapi id 15.20.5395.022; Thu, 7 Jul 2022 13:07:08 +0000 From: "Danilewicz, MarcinX" To: "Singh, Jasvinder" , "dev@dpdk.org" , "Dumitrescu, Cristian" CC: "Ajmera, Megha" Subject: RE: [PATCH v8] sched: enable CMAN at runtime Thread-Topic: [PATCH v8] sched: enable CMAN at runtime Thread-Index: AQHYkRXsgKYI21ChWEacXk5RTweArq1y2yZg Date: Thu, 7 Jul 2022 13:07:06 +0000 Message-ID: References: <20220704091926.549909-1-marcinx.danilewicz@intel.com> <20220705170533.709971-1-marcinx.danilewicz@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 193e1c9b-18db-428f-b21f-08da601998c8 x-ms-traffictypediagnostic: MN2PR11MB3824:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: y8Cwr6CuMNdqleeOxhze4ilxi98xMfpFnF968krusLRkLqmu8ZDxd2fPCQE6lEsf0zhpN7DtfLchldhWOFs0ApjLvgpmhWnEsSZ5IBMyjdu1KYSH0BDv4YCUiyX5YIh6FERS6mIHz3VOZIAdF360yxvtlDX/WZiKhEtqsain3+j8VJIwGBbp6Re5kPqpKIydwM9kSCZpBR/nT4MtHzLqgOGtZf12UzrKHzCQWpFNOOnWr/Hw06Z6vDE7IT/zQ/fO/497PFERr2zWoUwQy4n8lnGv3MuGpoKKSrMqapZFdgFa4cFfzh4UOTy0zfXj4EwrNofvwN1q0AMZoOb3V9BMXF0ARXPN7PYRt0kx08337sFZVjXf6hWrbktBSsT6IYobgq0DNTLbLzjH2NLD+pnltbo+PdUuchu6aWxiiBA4n36r+NMywMf81JcPS92TFUhoFJ5qGeaWAL04MTVFlfkz7odbV84aXnIp/QyxSxVwiEhfd54YZveIlnz4zw0tSlmOchMwAbbz+i2/fzo7vLzlD3DU/zPfbn4+OJC55czE3wCcguC8fYlrv08t1LlVPDO31zr88BC+0pgvXrg5bVOpt0Rl91A23wMP2Kt5c/5M8F2q5V/GDDpk8IbsyhgcLUGhbvGmHYmjEFywlkZW8Hqv6hRe34PyoVf1DueDqlKFdz61dnRdALaRgkncpDOU0Nl0ci4v492U5+cE5pkTIKyeP6WMT0Psp48KhgezfHCECWIB5uUsen6Yc6WPBAuQnCqLLDO8PczUcMuyccx850afsJL3gRz75q6QlRXiBTynV6bzwsS+X4cZXPxfAiMJFPXS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5784.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(366004)(346002)(396003)(376002)(39860400002)(66476007)(83380400001)(186003)(64756008)(8676002)(66946007)(71200400001)(110136005)(4326008)(66556008)(5660300002)(478600001)(52536014)(66446008)(86362001)(122000001)(33656002)(76116006)(8936002)(38070700005)(82960400001)(9686003)(107886003)(38100700002)(41300700001)(6506007)(7696005)(6636002)(316002)(2906002)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sgA39x249m4NjMVD/+kyWki74eCy1uVVcG5MAa75s9Sxey7ZUTr2eF4z10Pg?= =?us-ascii?Q?RMmoFnMM97dsJtvzcDWri7P6jxj4kBfzu3V44LAWYVPkPW3d9NbzJDM1oETd?= =?us-ascii?Q?gJF8r/7dYzvQfft6KpEZe53a6r8jd3JfK2NIFKT6bhrcfej37UT1QTDrbDdN?= =?us-ascii?Q?X0EGlToRANRbACS8hQqtjEBKyhn3DKnhx4wKW74tk5jhTVFGzlOdBY3/8Yk8?= =?us-ascii?Q?YZ3S+mxvInIY/sKD82PZJnq5V+yoMkMFtBnlKHtECVIytpNASnZm0ZEVsfor?= =?us-ascii?Q?4v7p5vcW6UtQfxoC2FJnu4M7BOZwBynpnQEbHn3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H77QVmlPCFMS7g/Dt/JReep++5TFLU765KOGBYx?= =?us-ascii?Q?LvAV0/GpXAy7ObIoEfEkRIINvtQkJcB6CUJgUSrshOEGaKDnmYSCH2fXZdMj?= =?us-ascii?Q?36Sp/lMAYAcRTxrqR3/XSeoVo4KP+Lm7xBvRs4Cn/oKRoL9+ladvH0Q6YZEn?= =?us-ascii?Q?o6j+oaNqWZzvHNM3wiZOgEhnX+i0AOBnQq+zVZQYzNsOXS4yJOa6+iBQGJiF?= =?us-ascii?Q?iWwLJ/FxtGoIcGZ42pNFo0wSF0E8oRiCxcHu6s00qAKltrwjqpIa5UFGeBwO?= =?us-ascii?Q?G8JfeZ2kq34AItjXthVDU/4rj0deojzAAUYJlEH57TEDJOOAkrFNmk1sGm4f?= =?us-ascii?Q?QtVkkJ3FG9Keq3PGuC1w2hDpZyhcImabJRFboTWqZJ2kJg9nppaRkenL1Z5l?= =?us-ascii?Q?uVPBkaWgG7Deb2nCqtZ8sxJPzQcDgc9Prm39FB6wZe2K8Z63EWKNWWnE11y0?= =?us-ascii?Q?ULkhtw=3D=3D?= 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: PH0PR11MB5784.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 193e1c9b-18db-428f-b21f-08da601998c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2022 13:07:07.9928 (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: RcEFyT/RYGK+F8kX8AKYAYn5IDm3SF4CeS6ocYMMkWKalc2NH+TwjMMAwgDYvexzeXciKy0o/ZtcFd40OnLVMMxGkFRMuLxn2Ho8osClMFE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3824 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > > Signed-off-by: Marcin Danilewicz > > --- > > Log: v2 change in rte_sched.h to avoid ABI breakage. > > v3 changes from comments > > v4 rebase to 22.07-rc1 > > v5 rebase to main latest > > v6 commit message fixed > > v7 changes from comments > > v8 with changes from comments >=20 >=20 > You need to explicitly mention the changes done in each version to help > reviewer easily locate the changes. Yes, yes. I am going to provide more detailed changes and explaining histor= y on what changes was made. This split development over time is the best ex= ample to show that need.=20 >>@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params > > subport_params_default =3D { > > .pipe_profiles =3D pipe_profile, > > .n_pipe_profiles =3D 0, /* filled at run time */ > > .n_max_pipe_profiles =3D RTE_DIM(pipe_profile), -#ifdef > RTE_SCHED_CMAN > > .cman_params =3D &cman_params, > > -#endif /* RTE_SCHED_CMAN */ > > }; >=20 >=20 > Similar to what is discussed for qos_sched sample app, set cman_params to > NULL and remove default parameters for "static struct > rte_sched_cman_params cman_params" above. Sure, that will be done. > > -#ifdef RTE_SCHED_CMAN > > - struct rte_sched_cman_params cman_params =3D { > > - .cman_mode =3D RTE_SCHED_CMAN_RED, > > - .red_params =3D { }, > > - }; > > + subport_params->cman_params =3D NULL; >=20 > No need to set subport_params->cman_params again to null as it is alread= y > set to NULL in init.c. Sure, app_load_cfg_profile -> cfg_load_subport is also not called several t= imes, just once > > } > > -#ifdef RTE_SCHED_CMAN > > - set_subport_cman_params(subport_params+i, > > cman_params); > > -#endif > > + subport_params[i].cman_params =3D &cman_params; >=20 > Since cman_params_is global variable, memory is allocated regardless of > whether cman mechanism is enabled or disabled. So subport_params- > >cman_params will never point to NULL even when red/pie is disabled. > Define local flag "cman_enabled" and set his flag if red or pie is enable= d and > check this flag to set subport_params[i].cman_params to cman_params. Ah .. nice spot. But, cant we do that with additional check, using what we = have? For an instance: If (cman_params.cman_mode =3D=3D RTE_SCHED_CMAN_PIE || cman_params.cman_mod= e =3D=3D RTE_SCHED_CMAN_RED) { Then set subport_params[i].cman_params to cman_params. } BR, /Marcin=20