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 DA7EB45AD6; Mon, 7 Oct 2024 17:22:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C809D427BF; Mon, 7 Oct 2024 17:22:12 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 5CEE44021E for ; Mon, 7 Oct 2024 17:22:11 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71e050190ddso752179b3a.0 for ; Mon, 07 Oct 2024 08:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728314530; x=1728919330; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=fMNHhu8Q5FHrFQZy2q1XiRpoFpL6tyJFSzCGiqL1NzI=; b=Um6il5XfunBL19iZGEf5l/XWvD1udny57FSsaHYbjxybEHlOXD7HEo2KUPAoNZl004 xi/epuM0DcIRTyGgeb5XbDMY8zkAKtySFdbhwi23JgsmFpIMCibVlEKXazTkakFPON0T QpG39iQcQacU5fp5gWHRdQnQwibRHqYQ/5VeoVv5cCx5UjST27lgn/kXg2QfCqJYBwF5 4hMqW3IIraQhRTHqFlCh1FjsjSPKA9Bp/vdmpSklIG+NEqePj71IB+PnVymQWAdKubWc cJDPifvHHl4fzcqLNEjxLkXdsviX1GGOKLGSDOOaMxW4e/h9JimXQXzjZdmj3daT+rXa j1bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728314530; x=1728919330; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fMNHhu8Q5FHrFQZy2q1XiRpoFpL6tyJFSzCGiqL1NzI=; b=umdLbX1QMA7rJ1JMs+PzWQDZJTRY6asRkDy7TXGDgx4qtCGaXr47vrUNjOXqzg+B1I XALpiE2wY7Nq+eYNstL1ug7HEbEtF9EQgf0di9CjULk/XC/Yj6kZwvYpJmWXGSQd0ZjL Vfi++PFSH/F98tJXUntTxMrQrWsd7eFKxjAxL1WVzjl6nYOudfshttzB6mnhCmjX/DIN zvMKtUbjIwcyzSdutHg2p2d8/ncFFtw9Tvv7i2VxPBFwPO6yFieNBPCTYw4FSDNRBFEf MIyVXCh9W4okyr22Q3LRb9fpkW8os7YiJJjqEbIZQjFykrmZfAjWv3+ssJMvjOWv8aCQ iEQg== X-Gm-Message-State: AOJu0YyTfQOtrr8JNCZlE2pRW2X7Z0DkmqSNpo9cSQjX7sx/YO/yIQmu eWBZ6X4v8vMn9A5h656ytZ61hbkJYYopsFnAKX9GCsN2BsvuCmscoN38lY65YEpNQzf8IzBVjZ4 u X-Google-Smtp-Source: AGHT+IHH4f3dQTc6oS7w4KWMmZv1+y0sgXpsw/QjMbjVrRPq8QO2LNhi1u7K3VDaETGQpXi8r27qUA== X-Received: by 2002:a05:6a00:2d07:b0:71e:6ed:9108 with SMTP id d2e1a72fcca58-71e06ed93d3mr3889896b3a.2.1728314530575; Mon, 07 Oct 2024 08:22:10 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0d67c6dsm4649207b3a.178.2024.10.07.08.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 08:22:10 -0700 (PDT) Date: Mon, 7 Oct 2024 08:22:07 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Subject: Re: [PATCH v2 0/3] make struct parameters constant in rte_tm APIs Message-ID: <20241007082207.27f1f01d@hermes.local> In-Reply-To: <20241007114907.548941-1-bruce.richardson@intel.com> References: <20240806152417.3649745-1-bruce.richardson@intel.com> <20241007114907.548941-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 7 Oct 2024 12:49:04 +0100 Bruce Richardson wrote: > 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 > Series-Acked-by: Stephen Hemminger