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 9E4E045757; Wed, 7 Aug 2024 09:27:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3407B402DE; Wed, 7 Aug 2024 09:27:24 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id A70564029C for ; Wed, 7 Aug 2024 09:27:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723015642; x=1754551642; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=GoaVI+8q4uN/QPoYPFnyF76F5wcPjMC66rZKTMuwQmU=; b=D4Id//W1SwhEgpda0eSBdtzooEzpGLzxn3ll3e8hnvKVDxpcXrXY2A/1 ClhzEQdfnchHw7mfP5pWkW76rj3zr9K3ZXnwLWJ3YFLVnXZcBC3JJnuni kB8FvFbGW8/h3MraORrm0KcL1hWv/SHdCsoQc0N2BYJbpgl/dK96Am3uf pBg4x+fRpSnlkuKP+/YCzWf5pmZrGj0yTRg3pm+gqpQOl+4ddaqjvKlib Qntsqv6nG9+o+gaaV2ogcElp3rfvU5ESl0iAUmOAvholzC32896CqWh8+ PYUhvZZg1TJnV20SioBfDhk8qVM9VBTgOJ0WIq3ZeqXtW48t5An5OK7kR g==; X-CSE-ConnectionGUID: UoZcUioqRWW0PBLFRFeuYw== X-CSE-MsgGUID: pGwrvWULT3upDbfG6rDyLg== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="43594370" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="43594370" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 00:27:19 -0700 X-CSE-ConnectionGUID: M+KZK5RCS3qaO0kJNuNoyw== X-CSE-MsgGUID: 1bGBxGrvR2+Y8VD07uB/KA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="94321999" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Aug 2024 00:27:17 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 7 Aug 2024 00:27:17 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2507.39 via Frontend Transport; Wed, 7 Aug 2024 00:27:17 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 7 Aug 2024 00:27:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vT80HGAj2pR3tyNCwn0Hk6ErM80WVqR1ob3ARJlzHZPps1pItFHvzrtxUiJ3+n+Zu3nxyyZDcRLsUuElYd3H8ocLnSNu/xx2THVdFBD9lC7JCqPsDgi5BeGNWbUEnhsQAkAJF12jbGaHA7Iek51wWfucsg7vHaQLyfmvIelcPOSWpwQ4zPgJVJL7QMVp2bBi1iEmHIb4FRrnuCGjqJpUlHIXiN+smidWS/+X8BSpS/QOXBDJdG1Pr3QsFr9ay8V1m/lIrck16RDtWk16qD7V7mHSykwGlSlJsZkwpeYNVdRXIxOLpsEMXc1WVGVf5ojrT1inRAYMc408U8oRlNmrIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=JDiy+U1C0q/qXJz4zKihpukyOzBJZwtp62Q8zn59gDE=; b=eaYFfXMtfjExYwdGtV8EuLhvD08gDIK6mmTLBxaD0IwUjvLxJajIBjLKPvW2YYKE3ivaZBUeJRSnxI3ylAj5Q7DU47P1P1gOhRo/tyHzdQ/hX5+eYtgH0xg81MZZdWVBuNP5MoTQabtyRNVlxAgYB0sqRfxZrg9lfpDBbQy2sigE21wOTfT6ekSXXK8aFOTshpm8JWbCA5Lu9LyIQ/U7LX7vCABXiagFI4KB2PSh5ESjO7LS32Nb4ubNCYMmo4clWypppQoM/Pa8c3DICUiwHnWgE0mxHuNwVsvAqcpR0H49AesjIVdt4tcELFXpnyGTAihc3sH/fc5P6qsfpp9B9w== 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 DM4PR11MB7757.namprd11.prod.outlook.com (2603:10b6:8:103::22) by SJ0PR11MB4816.namprd11.prod.outlook.com (2603:10b6:a03:2ad::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Wed, 7 Aug 2024 07:27:15 +0000 Received: from DM4PR11MB7757.namprd11.prod.outlook.com ([fe80::60c9:10e5:60f0:13a1]) by DM4PR11MB7757.namprd11.prod.outlook.com ([fe80::60c9:10e5:60f0:13a1%5]) with mapi id 15.20.7828.023; Wed, 7 Aug 2024 07:27:15 +0000 From: "Xu, Rosen" To: "Richardson, Bruce" , "dev@dpdk.org" CC: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra , Hemant Agrawal , Sachin Saxena , Jie Hai , Yisen Zhuang , "Wu, Jingjing" , Jiawen Wu , Jian Wang , "Dumitrescu, Cristian" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: RE: [PATCH 1/4] ethdev: make parameters to TM node add fn constant Thread-Topic: [PATCH 1/4] ethdev: make parameters to TM node add fn constant Thread-Index: AQHa6BTQpWJXidhbS0+wvgwb8KeH2bIbZTdA Date: Wed, 7 Aug 2024 07:27:14 +0000 Message-ID: References: <20240806152417.3649745-1-bruce.richardson@intel.com> <20240806152417.3649745-2-bruce.richardson@intel.com> In-Reply-To: <20240806152417.3649745-2-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB7757:EE_|SJ0PR11MB4816:EE_ x-ms-office365-filtering-correlation-id: f3103373-4f19-4472-0935-08dcb6b25c59 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|7416014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?nsKz9gGRKqK8NnHxaakJI4fl3EI7JvOhNsoKu/7aCUdcnQoI8AEPrJFhiGkW?= =?us-ascii?Q?PCWcH0FlD/ZXuy9FXzWwfVPSsh1pqbxDpzOcI12xZsACa16nKlRrvXEkjzZC?= =?us-ascii?Q?a3SqDG7YP2FdtMCHvc3q6ITTD0SVDMqgfmvB83a8BcchIP+gV2O9ty42TvOP?= =?us-ascii?Q?2Fiky9yyM9qfpEy2SGMRt0VbY1NS1dlNhVMz0ZM3HOLwjFvVcyZkMDQtpa3l?= =?us-ascii?Q?Uv8R7Ynhk4a+twNpA1rsuMe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ascii?Q?pLwN1mRE8ADIB2MnIpQDgGCD1LYN+L8nX8nP/zgHyP7Els0gqakparCqaAfe?= =?us-ascii?Q?0m02zdGy3h263r431CXCz4oLQdZLNF0mWoul4pSqrFDs5A7V3L8L4247qCZg?= =?us-ascii?Q?SU50yvf8Dd+WMCJxpv6jc0Q6LHvwbFG9ZK5SHTHgCL1Dof7y7Lu9aTGZnzDe?= =?us-ascii?Q?nUe2DzVJW1JwVhrozYL6KZbYX1SXk71ZYu3e2XnS5F7jeMO+7F7q0nTcYK8v?= =?us-ascii?Q?KWnzjeHRVLVjWsnW5id1CzMGBmFDRAp6AGD3tRJDJlioq4Fvrw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB7757.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(7416014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tyPuU8Z7vCPZTA7snzYmG+clYehcs7foHH/FAVQ+fhqX3wBJnB/MCFVYNV7+?= =?us-ascii?Q?G4ucrpazlDAVzJTuR8IHe33qCtglxETFKkCN2ICERPbm/pfsTtkO7NIlg7Qo?= =?us-ascii?Q?d5pCiuR6VdnsU/CYRYglWXUTP+tPjHKjyiWZyQdU24sWUfShSvPkTr0Bhwey?= =?us-ascii?Q?jYqielbVV0juj5NBtngtQsbfkR5MbWSyrhpGShR9yGPGnd6nqYQNJ0+LvAxF?= =?us-ascii?Q?fnpL53VcIgiZYN2fxA49fiE9JdnvSVwMRYwXtbPybbjpAKqnVkH1Gev1ZLGj?= =?us-ascii?Q?x18hZ+j8+nuark+Fn+6ww+bV9Wbv0plMcS9py6736wFSx30O104lXbStLv9w?= =?us-ascii?Q?LiOTwukL/63JGLn1ax83evt2sK+OHCVVf/F7iAIVoccioOiIhMuchsbzWGk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SxgNCAhsNStwpUB?= =?us-ascii?Q?CihNq+/6kpaxGNjuFcE4dOIzGZDtN7D16EYCmVrpi5E3P7buFpQVGFlHTa62?= =?us-ascii?Q?98rydxo9b84AYdyzM9iBVNkcGVx9NKBfWVYMHH5kBqTpV9oiV8cvxMyZlMa8?= =?us-ascii?Q?uzv8Q7wlG9b5awpvjyi0gDh9Q5EQhIbgAE18WAU5tHCDi2jsrzULSsYrSIJW?= =?us-ascii?Q?IVjDvs1Hnlmjzwnk6W3M3LYIxbcK20aCFcOACsxowlO7R7uaJaa6/o1MrAoM?= =?us-ascii?Q?4gkRtkHABA5CGMrPAgw=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: DM4PR11MB7757.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3103373-4f19-4472-0935-08dcb6b25c59 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2024 07:27:14.9161 (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: ycZjrfx1KoTmjVq52naz0WGa2LJI/WZFirbkuHnEM/WZpForZW0y8vG+E9FgE+zPE+FI8CQ4diW4HdiyrfbCmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4816 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 Hi, > -----Original Message----- > From: Richardson, Bruce > Sent: Tuesday, August 6, 2024 11:24 PM > To: dev@dpdk.org > Cc: Richardson, Bruce ; Nithin Dabilpuram > ; Kiran Kumar K ; > Sunil Kumar Kori ; Satha Rao > ; Harman Kalra ; Hemant > Agrawal ; Sachin Saxena > ; Jie Hai ; Yisen Zhuang > ; Wu, Jingjing ; Xu, > Rosen ; Jiawen Wu ; Jian > Wang ; Dumitrescu, Cristian > ; Thomas Monjalon > ; Ferruh Yigit ; Andrew > Rybchenko > Subject: [PATCH 1/4] ethdev: make parameters to TM node add fn constant >=20 > The function to add a new scheduling node in rte_tm should not (and does > not) modify the actual node parameters passed in via struct pointer. We > should guarantee this by marking the parameter pointer as const. This all= ows > SW to create multiple scheduling nodes using the same parameter struct > without having to reset it each time. >=20 > Signed-off-by: Bruce Richardson > --- > drivers/net/ipn3ke/ipn3ke_tm.c | 4 ++-- > diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c > b/drivers/net/ipn3ke/ipn3ke_tm.c index 0260227900..cffe1fdaa4 100644 > --- a/drivers/net/ipn3ke/ipn3ke_tm.c > +++ b/drivers/net/ipn3ke/ipn3ke_tm.c > @@ -1010,7 +1010,7 @@ ipn3ke_tm_tdrop_profile_delete(struct > rte_eth_dev *dev, static int > ipn3ke_tm_node_add_check_parameter(uint32_t tm_id, > uint32_t node_id, uint32_t parent_node_id, uint32_t priority, > - uint32_t weight, uint32_t level_id, struct rte_tm_node_params > *params, > + uint32_t weight, uint32_t level_id, const struct rte_tm_node_params > +*params, > struct rte_tm_error *error) > { > uint32_t level_of_node_id; > @@ -1168,7 +1168,7 @@ ipn3ke_tm_node_add_check_mount(uint32_t > tm_id, static int ipn3ke_tm_node_add(struct rte_eth_dev *dev, > uint32_t node_id, uint32_t parent_node_id, uint32_t priority, > - uint32_t weight, uint32_t level_id, struct rte_tm_node_params > *params, > + uint32_t weight, uint32_t level_id, const struct rte_tm_node_params > +*params, > struct rte_tm_error *error) > { > struct ipn3ke_hw *hw =3D IPN3KE_DEV_PRIVATE_TO_HW(dev); diff -- > /** @internal Traffic manager node delete */ > -- > 2.43.0 Reviewed-by: Rosen Xu