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 44E5E45757; Wed, 7 Aug 2024 09:29:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C65C402DE; Wed, 7 Aug 2024 09:29:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 0760D4029C for ; Wed, 7 Aug 2024 09:29:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723015765; x=1754551765; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=T0AKRcm1ISJhDOYTiOpq/6AHZEceA9AM8WUHNst+kWk=; b=YmdNkPx4lNJy/9ffaiu7ywKV4k58BVacI6Ebjly1VaPuJkbz/oDqrZ2G idX5XBennyuI+Z12j4smcxz6o9mZmhrmPzdVdK5Zu13WnJH/MNFuB/Lbu 83zvGsLpAll3aBwUu6G81j3hjhBkw2UzmVPrUi9dxb8PNZRatuQypA/XG L1tJGQHTgU/ZntPgNUWFyvl1nqR9MqZyrBEq0Qa2+vde9rtNxqn1q6MLz LinVJoruIYv3CgfJ57HpnhtP/y6zup8vq5Vbne1x5khpIVGcBawdhXCsk LDjLX2DQt7lzxm6vu/PHYuWEqMA8MdXkcr6kj3miBSv4AwOqexyszC7LK g==; X-CSE-ConnectionGUID: nri9SnUGTFO7BWH2DORwfg== X-CSE-MsgGUID: cxI1rd2tR96CafMd9koT6Q== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="38579210" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="38579210" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 00:29:24 -0700 X-CSE-ConnectionGUID: /DF5idcoR+625Iwk7jNZPw== X-CSE-MsgGUID: 9HroD0JOQ0G00RWRZjYLqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="56725790" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Aug 2024 00:29:23 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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:29:22 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) 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:29:22 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2507.39 via Frontend Transport; Wed, 7 Aug 2024 00:29:22 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.43) by edgegateway.intel.com (134.134.137.100) 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:29:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=trG8+W7lYJBDUEVPesM45rWs3oUMEsQI0J++0OG7oKEfPtMocC6TCfZVVglUbFIOBHdDspJ0F4Xw1j5OWxoguASN9vqKLofbCH9dT9Oy4FM8mCcEMn3CMkVPjkVLivGnJzekznCBlb2aqm4pw3ysCfQ9CJLH0dxYQorndG8IqQXlo95rvJLecxyOA45Qxepy4VZ+8eAUequGpjc+LgCRccISmaCRe32oc0rszL52IUurHqyGlk0dWIwlQ64Wkr4L92Y2wOlB2GsIbJUkUke7WMVsPtdDMBFjYptvgql+Z8/p114tKkbliOrH050fWs9gp4KK8YwsOYf7sKzH0sYPZw== 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=J5VX9E0X4WNqlqxHWnPRihN3M417Q/TasWojUujRvi4=; b=EOiGXW/baWIQNnrBL5P+m9NDvFK093g2Wk+sN4gobz/si1l/R+GK+4vFiQ8huU1Do6JLnNI90H667HX3MRDNUPuOU7y2jgHZcrO5Jb9dsAs9FiezKcwr4A8hgpXPesaKrpVz7ycAzoJVB+i3XmPFst61St35TmAvNaE1ZSre5buQizpgOBRqlSYdzilG1O/YbQHLCU1D178BC7Tv9PNJCzWQIS3Q0o8eWUBNV/fnyle3mrtVrAdiHw1B3+zXKGJgZhh0uTXWYv+78jqk5xQ9xh/DPb1uXXzyEnymS6+Ka5xCBoDe7hEQJvWTjWdi8l3GyijiH9izLcpRI55Oey2LcA== 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:29:10 +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:29:10 +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" , Liron Himi , Jiawen Wu , Jian Wang , "Dumitrescu, Cristian" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: RE: [PATCH 3/4] ethdev: make TM shaper parameters constant Thread-Topic: [PATCH 3/4] ethdev: make TM shaper parameters constant Thread-Index: AQHa6BTeovBcBQm8p0WzpAT9yij4O7IbZnsQ Date: Wed, 7 Aug 2024 07:29:10 +0000 Message-ID: References: <20240806152417.3649745-1-bruce.richardson@intel.com> <20240806152417.3649745-4-bruce.richardson@intel.com> In-Reply-To: <20240806152417.3649745-4-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: 607c9faa-620e-4cac-df5c-08dcb6b2a15c 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?4aBoRWcHIhfOdUUf/0JNs+DVk0pQ7AUvtoJeyImSYaWzQlV0OSdvgEXICrzK?= =?us-ascii?Q?AtuURvVY57gX3r9Ndu8rFxXyor//EI2L67PF1/pmtDiTDKgI55ov22qFjPyO?= =?us-ascii?Q?kolxG/zZHlpzLsZRbUITwXOrXnNJWBBY/9XhIZIb9Ql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itDhWE75bFdgMp3limJZsth4aosb+xedrV5I/nfPun?= =?us-ascii?Q?iUeYxb6QFcFODqARgnIwZI1Y9kXaJs7/HRUJHFlRWTf1aZcWL9Mhmx/lDvP8?= =?us-ascii?Q?s9W2fHjsz8H383NEwbZwGsx6xt7RsCuzyBOXi/rEDdIudbE26lDfFNoNeQ4T?= =?us-ascii?Q?u7qiXbGbqOjVLxqEfMGatlLo/p6imk7ZfGM/j4ZkP/SIZjvCPmcihTDo7qtX?= =?us-ascii?Q?bvDSaB5YPmwpQ/mVHKnDXapG/XHVqa64pzuPfPHYEr/8lXWubOKGYDopiLgn?= =?us-ascii?Q?EZ6WD6JhTv08/9QKvP8TRJ/+bcaadNvXpqirT5T2YtlbFkcI0Z3p8DtGanGL?= =?us-ascii?Q?piVhIP+erqde4gt5KQYN0L9kv/xYLHFTR4423KBY9sU0Sr6UrA=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?9QRIb/URlx8xmEHjkufMWFffQhImll/jSsgviPhTzSkWG4ZUaWjtS2UYMSRf?= =?us-ascii?Q?ZV1RVxYflOvEGAItYn+ONMHFwZ0/l30odHCJV8ZVd8/WOwLfgmAtvxaBd+fT?= =?us-ascii?Q?hse0K8rAG1emK59GNkISrodlecvFuu2fYCiFLHiCNBvuDrars2wqh+MEZaHr?= =?us-ascii?Q?AxAuA1kBrXbpNEtNoH0HTFjwJd32Nv/w+mZJtPTJoo6jj0BspnHazmz/2RaW?= =?us-ascii?Q?g4GNXBqs1G0DxTPKfxeEOqr93V2ip3SsHSzsYWc9aq0q1Bi3ZAtq4L36c6Gg?= =?us-ascii?Q?04DV10x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=?us-ascii?Q?fZPlHJQg4AXnwZf6vUp5L9kgTHJvYw0lLRWDtcZ5ikC0+M78/hZEjDW4CMgZ?= =?us-ascii?Q?0W6kuRCSoyvKB8RKXevEt9kAKHw5KtiJYkGtYOEJ/GXSBD+LDK4TpIuxAbPn?= =?us-ascii?Q?qu+UTItG619pihSLNmN5HLRWnQa1H/z6g3bsBnfwK/pz1uvImGoUWu+DFy+r?= =?us-ascii?Q?OlKczEQXcO2WKoNFwR+yOe/Hc93d8BdHSofXFIk2cBr1b9u4PDWrEpaHcfQZ?= =?us-ascii?Q?/xRFQ/hxyiqnN2ISfwLYw9AkJ1IxEH2WTyEHI6hSpPsHFJDDBfmezoz8KuY7?= =?us-ascii?Q?UqYjcgWemwPF2UoOwN5WdVXONYk0DHVRWPskPZaABU1T64EtNNMlVju7h3QX?= =?us-ascii?Q?rCxvwbcydFtbVX/pdoGfYxFQ9hXqFtMesZmXepNf?= 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: 607c9faa-620e-4cac-df5c-08dcb6b2a15c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2024 07:29:10.7404 (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: Szqnx899ASKUAyNCqiXKVr17+G47ndM8fmoYnSKMX6tHmU58eSoXjQ/qkzjfQ25bi+pWc/Y5dbz0Kl96BMusRA== 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 ; Liron Himi ; Jiawen Wu > ; Jian Wang ; > Dumitrescu, Cristian ; Thomas Monjalon > ; Ferruh Yigit ; Andrew > Rybchenko > Subject: [PATCH 3/4] ethdev: make TM shaper parameters constant >=20 > The function to add a new shaper profile in rte_tm should not (and does > not) modify the profile parameters passed in via struct pointer. We shoul= d > guarantee this by marking the parameter pointer as const. This allows SW = to > create multiple profiles using the same parameter struct without having t= o > 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 20a0ed0467..eec01bb037 100644 > --- a/drivers/net/ipn3ke/ipn3ke_tm.c > +++ b/drivers/net/ipn3ke/ipn3ke_tm.c > @@ -722,7 +722,7 @@ ipn3ke_tm_node_capabilities_get(struct > rte_eth_dev *dev, } >=20 > static int > -ipn3ke_tm_shaper_parame_trans(struct rte_tm_shaper_params *profile, > +ipn3ke_tm_shaper_parame_trans(const struct rte_tm_shaper_params > +*profile, > struct ipn3ke_tm_shaper_profile *local_profile, > const struct ipn3ke_tm_shaper_params_range_type *ref_data) > { @@ -747,7 +747,7 @@ ipn3ke_tm_shaper_parame_trans(struct > rte_tm_shaper_params *profile, >=20 > static int > ipn3ke_tm_shaper_profile_add(struct rte_eth_dev *dev, > - uint32_t shaper_profile_id, struct rte_tm_shaper_params *profile, > + uint32_t shaper_profile_id, const struct rte_tm_shaper_params > +*profile, > struct rte_tm_error *error) > { > struct ipn3ke_hw *hw =3D IPN3KE_DEV_PRIVATE_TO_HW(dev); diff -- > /** @internal Traffic manager shaper profile delete */ > -- > 2.43.0 Reviewed-by: Rosen Xu