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 E8BC5A0543; Thu, 7 Jul 2022 18:29:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B674406B4; Thu, 7 Jul 2022 18:29:16 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 30C914069D for ; Thu, 7 Jul 2022 18:29:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657211355; x=1688747355; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=OjKwMq9cG7wCrN2g5vvwJ4Gjl23TJRGcT/zF3HzM+J8=; b=NXub+8AQaTPoUfbDLDCkwf5uNTIUK2txKZ3gH8/l6fhS/RoLnFPrGBsn Wrz3kCXGLzpTy29vef/FZC+ZlzA1VW8ijiYjBeY34wE8nFYQR4/a2Dt1X izVMcmM6i6539FZCrosbPu4pSJbZvzsdy7lWxMbMFY4+y/ShqTicxWtuz Veq3CmgVmFnJ9nz0+jtEobbyqPwrzLELUkbtpC95HKWMbHujRI3N8sVfo ny42byyW2kLtIR/rqetIs+U5JoV6+/+CGRL5svDxys54ar54eZbTdnqgM oMdC3Rt9j2EAobHMgeFS+yty1ip4NUy2JX2Hs6ldFUoRLqoZ49eQQ3DrC w==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="309626084" X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="309626084" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 09:29:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="696567919" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 07 Jul 2022 09:29:13 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 09:29:13 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 09:29:12 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 09:29:12 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.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.2308.27; Thu, 7 Jul 2022 09:28:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j/xBqW8Fbm6AsXCO9VFNj/mB5TEVm3bESiu6O1B6UbaJG7m/Jb+HALhCJsjgzXebhZ7BXRFAwQfYOxFwITLzU3zGVuc+Yg5z46F2QDBjNJxmdVa+TlUvp2QB4n3JQgQIB73YGkVj7K7UWA/lXO/dIcCZiZDBHT4mbO9ETp396EccLOTQKpRQTBV7rlPRtkpl4PKeIGy26JK6Eh9FV3J12gadWTG/ZR8TyreWqVqV9hr7uaJ0LybOng3ywE21Y8+aSn0KRI4oaCiyT0dfzw8Nb+xRE/9y63v7THZcjs2aBbvsV/xrGaxJIGa17Fehp7sA+nyjpVXo+mlFD29dxI5Gpg== 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=GuC3DmFZ1egyVfLBBC93Lo2ynCGhup8Qg8hBKxIWotk=; b=ctM3wvnWyiTQ/rJIZ5YE8G53mc9RKFIhx478PsD1FYrKf4fRlCXOV4Qzqt7wJC++nkS9LHbTVEz6XUoPIWfoZoEzj6CAtzSyFJ9n87ujWHXP+znyWjXsmF6nh8/zce3yvQQdSIdQNcFAgj/gaBo/IusjqvXFkjSo+psDpoDZ4jimChlvk2YPc461JB45aW5ewnGTfE7/7vjl1O1ok2ebGRv4wpX2/PxPjkxlG5oitbru2hiROMA/wQvmiwS61klz/PMVJSH4gHh9wVubHrYXqvBukm2cQST1tygp+8tYc2lXQg95ZwzsZDejJlaeS25L3P9dQM9iQTBXX1Fft8/7Qw== 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 CY4PR11MB1589.namprd11.prod.outlook.com (2603:10b6:910:e::13) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) 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 16:28:34 +0000 Received: from CY4PR11MB1589.namprd11.prod.outlook.com ([fe80::d8a8:752a:a43c:b7db]) by CY4PR11MB1589.namprd11.prod.outlook.com ([fe80::d8a8:752a:a43c:b7db%10]) with mapi id 15.20.5417.017; Thu, 7 Jul 2022 16:28:33 +0000 From: "Singh, Jasvinder" To: "Danilewicz, MarcinX" , "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: AQHYkJF41r5q1C/aJk28fi3TbaVJm61xBPlwgAHezgCAADdeYA== Date: Thu, 7 Jul 2022 16:28:33 +0000 Message-ID: References: <20220704091926.549909-1-marcinx.danilewicz@intel.com> <20220705170533.709971-1-marcinx.danilewicz@intel.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action 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: 72cbb627-6a42-41b8-e9aa-08da6035bc7e x-ms-traffictypediagnostic: SA2PR11MB4860:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: B8psEEUkJgaJxik1gWV63O4M8TRTD3MMv92A2nssb6BBRxuPhUlkuS2Qi7j8MM6bMvR4OMqiqbrxJlqbFXnnZ/DIb4zDjPBMZi/zyONQNqix+kgr2tuOlu205ZYsLnEVkZPAby9wy95pRmNBAHaoM0nCBWZnf9s0fk2XPLRkGWuWhmgYnWFJr/lbUYeDFwgBKZ3zrO5sM2UtCWf6rMQT9imLaIhMYk4LE/2TmNUnA5tW0mL5zYSJx7s7StUuhtyquWiJ8r7H+9l1K0RpveJMobx0ocifZnZBpGWfb5UwUsCBCW1R15qWXWk2kJ0bLDH+ocmIGztjMS6HIV3EHImIXTHPC0AOJV2v2y+rUPrIoH157VL/9VwoqHCpsKFjvo/00UctIASPnezngFbssBHZD++6S6DFUoU6O08yHZBuvkEw6KRgf49JQRI2Txgdzli7dXWaSMo1EO5+1OIloKPrS0vXhf/gFRNmBkIh3/D38GW9/Ayt/psOBhGZu9pVFSeV1KEXzKym5N3PK2BM3g9ATfsS2dNFoys6DyIMBrScFDUhD+MromOSHggV5G25DKgCd4BsBp3u9rHbAiNqs0HlfyQ0CO9QiixaGQA412WpXh1ihixWWimH0GoZJe+T/O3HG+epNSUqyDlQ9SFBqHRGpUWSmbq2oYvJl3xEwhnqE+ZuKWFkz97CyFJWeU2CWjZVEJ4USe5j12Ub9hPpifPb33TzlLmQasKEMf9zdMN5+PcVgpqB5rS0Rnk+9YvmvNHH655YeVPMYPLOEzaLcPr5aGw0PoNj/vADaOl+BUT/Wd/ekxfuQNCw/dGFTRIh8e93 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB1589.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(396003)(346002)(136003)(39860400002)(376002)(366004)(478600001)(66476007)(186003)(83380400001)(82960400001)(71200400001)(4326008)(86362001)(66946007)(9686003)(5660300002)(66556008)(4744005)(26005)(66446008)(8676002)(8936002)(64756008)(33656002)(52536014)(122000001)(38070700005)(38100700002)(76116006)(6506007)(55016003)(41300700001)(2906002)(110136005)(7696005)(316002)(6636002)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xiU53+wNr1Q4lhM7t7LhydyDFun6Dbg+Er+HRYhFtjFzGdt4Ntk2h9kJm7sG?= =?us-ascii?Q?IcxOJexv+k9lgSlznf+v86cEsHOeN0GaWqzd/LrcBNTA7rk6DIbJBGMzOsWn?= =?us-ascii?Q?QpXxHrpBL45Q62jfhcifQQDH36EsUIrGjIGqaiKHWD7yHG9nN8kUpGZR/9Yy?= =?us-ascii?Q?khFX/yPNIyHfdZ9gXXmSNYEvQoTa41YaBqsFd44V3k/TWzwmOp0tsPBCR0rt?= =?us-ascii?Q?4/JX0Kc0PwFyFJ9qk2NqFJAkUnpOir/HseaAkta3TtzBefPDHGfCr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2iHfEpOtc7huh61w3cUhC?= =?us-ascii?Q?rvHHjJVIRVOSDr3wWt0jRl1ao4PBFkfjyLZvLYIPlN+zk7M3DrK/YfqQSL3/?= =?us-ascii?Q?uuMcQWU6K2lTp+WYush56HOe7AcCS1/tRj1KvJAlRjuPfz0aL1pDO3UmB1+8?= =?us-ascii?Q?uESsgYk6LMLUZxr53mXYmwQXwVf8kBv07VkpXX3WeOfTpBn3hAumhZu6Qc+8?= =?us-ascii?Q?A91fCTSaeBPf9x+DesYVuWoW8b2sEesQzNDm8IPUevEZu/XGJhsnVQFyungQ?= =?us-ascii?Q?QLxh4HU2pkuKxNBSyLAFVcG3rPyxtoHipRSJnZUP3n08ngO+QyvCO/W/yhPe?= =?us-ascii?Q?KsINEUCcziJlQThHCdjmes2lt1RV+xryzuF+jD86Ejm6EHHL1iuqnx6jFlJ/?= =?us-ascii?Q?ZAxO32IMdy205CJFD+VuEtMmIq9c/5GI8lqGsj0xqT6Rb/gLWtpxSCWX/EFB?= =?us-ascii?Q?Pw=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: CY4PR11MB1589.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72cbb627-6a42-41b8-e9aa-08da6035bc7e X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2022 16:28:33.8157 (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: zjaMf2GuHr5/ahkc2xWh+YebALwnDDF97F+mURKFUXGJNj1JD6D9Fe3uP1OC2qjODrRP+xnrRzzCeAIeXheB3ma+n9L8AqgVDfFA+TlGivE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 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 > > > -#ifdef RTE_SCHED_CMAN > > > - set_subport_cman_params(subport_params+i, > > > cman_params); > > > -#endif > > > + subport_params[i].cman_params =3D &cman_params; > > > > 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 > > enabled 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 w= e > have? > For an instance: > If (cman_params.cman_mode =3D=3D RTE_SCHED_CMAN_PIE || > cman_params.cman_mode =3D=3D RTE_SCHED_CMAN_RED) { Then set > subport_params[i].cman_params to cman_params. > } Yes, this is correct as well.