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 98F5345AD7; Mon, 7 Oct 2024 13:49:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EA6541157; Mon, 7 Oct 2024 13:49:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 622CA402EA for ; Mon, 7 Oct 2024 13:49:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728301761; x=1759837761; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y/MpMrFjNA+9nrWQolaO8mfwytBI3clpvx6g4H5CxWQ=; b=aQ08FBnhzr7EkVtMMVwvzOR+RZTyhC0KjE2igrX+flfXr8j9wXBwy/QG +2Uqa1lmhYhLmbyX8M6WtoyWYCDRl1xTunVRSc66EYQVkF0k7ZGknEH86 0co35E6o+DcCT8mMDDii+qSI46/1MO3/slZ9S7ByGC8phctTEpINr85+C t0bV1OKt0V3KvyNHV71AQzSShmLMOueS8MPQhPSKkwKIdlVNgj+/P7oZV aNo7DAwi2U+mR4XFzNXHo9HtQCtfsH9bYW6xKKPgtQ+02ijd0hwL9xTB6 Kh1XfoFFp3qCS78Pqasc+HVT9oridu667ObKiv58XR3M+mJKiKoTpOdPX Q==; X-CSE-ConnectionGUID: 3N5MxcMSSnKP4lnMK0jLng== X-CSE-MsgGUID: 9eSdJTxnRkmk67x3QloAHg== X-IronPort-AV: E=McAfee;i="6700,10204,11217"; a="31332470" X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="31332470" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 04:49:19 -0700 X-CSE-ConnectionGUID: 2YELaiwUTEuD2eGHZJIbEQ== X-CSE-MsgGUID: XUM8CIjoTu+cK2Ij/kljEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="80426992" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa004.jf.intel.com with ESMTP; 07 Oct 2024 04:49:18 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 0/3] make struct parameters constant in rte_tm APIs Date: Mon, 7 Oct 2024 12:49:04 +0100 Message-ID: <20241007114907.548941-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240806152417.3649745-1-bruce.richardson@intel.com> References: <20240806152417.3649745-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 For functions for creating profiles, shapers and hierarchy nodes, make the parameter structure pointer a pointer to a const object. This guarantees to the user that the struct won't be modified by the function, which allows the user to re-use the same parameters multiple times without having to constantly reinitialize it. V2: drop final patch with new node query function, simplifying patchset Bruce Richardson (3): ethdev: make parameters to TM node add fn constant ethdev: make parameters to TM profile add fn constant ethdev: make TM shaper parameters constant drivers/net/cnxk/cnxk_tm.c | 4 ++-- drivers/net/dpaa2/dpaa2_tm.c | 6 +++--- drivers/net/hns3/hns3_tm.c | 22 +++++++++++----------- drivers/net/i40e/i40e_tm.c | 12 ++++++------ drivers/net/iavf/iavf_tm.c | 12 ++++++------ drivers/net/ice/ice_dcf_sched.c | 12 ++++++------ drivers/net/ice/ice_tm.c | 12 ++++++------ drivers/net/ipn3ke/ipn3ke_tm.c | 12 ++++++------ drivers/net/ixgbe/ixgbe_tm.c | 12 ++++++------ drivers/net/mvpp2/mrvl_tm.c | 2 +- drivers/net/txgbe/txgbe_tm.c | 12 ++++++------ lib/ethdev/rte_tm.c | 6 +++--- lib/ethdev/rte_tm.h | 6 +++--- lib/ethdev/rte_tm_driver.h | 6 +++--- 14 files changed, 68 insertions(+), 68 deletions(-) -- 2.43.0