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 3A0C7460FF; Thu, 23 Jan 2025 17:30:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B597940B8D; Thu, 23 Jan 2025 17:30:19 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id E0D4640261 for ; Thu, 23 Jan 2025 17:30:17 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2161eb94cceso13784975ad.2 for ; Thu, 23 Jan 2025 08:30:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737649817; x=1738254617; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0qgAofBrE1xaZNBAi7var4Idcb9hECUBsFTB7Sa5Dus=; b=J8D9/Vk6GCz95ZqLTB4M4tAPyMdyTklqd+Qhzrx9tPuqSOGz5W1DiD+1UY2PCrieJ3 LuxmIeYtAMs3txfhZkzdzjqab03KYsIANMIdQ5cE6W2Q01hpOAxxr8j/XyaDT8TCYstl PJbxr+BkYIdH9MXa6I+IQwDEwTKMEiiMRO5YuDBQJ8J8U0gMOAB2yQoV3QIFoa4gpo2s YMFsGVpKUtO/Ry8w+S0RyOgiq4bMqJbvItsuiJRNY2btMAQwKhH7cKa/FDH4VwB0YQZL KZdyYYxh4HdAdy6E+WRZ1tipWJBs8VsCKzgJQd0x/+1d/ToFwh2oT/K2LuFFhsENDXVT 8P8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737649817; x=1738254617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0qgAofBrE1xaZNBAi7var4Idcb9hECUBsFTB7Sa5Dus=; b=iAWTZzkYXnjU4skkmIW3GCrNC2MJnww6ojl0LKvH0IaWUwgzHZJE7RalhKTQ2VTf6z bp3ZWXxnuaAsGt/oHqcskAhGeltMf4aC5aByyjY8DCWqS3x9p+CuU4fEc+gfg/niO7Sg VSATrtJoXIk0ppIyxvilhdV/9KgJjuBgXXuzEjaOxREwrFqwxtBs0M5J/+rJiAFvdG9q vbeYjnhLR+WawIe6sDnmU43O4uq52rpOdDu5mwir2OPWSJBPckj0fL9o/kVpg0te750J XSJQINeF1zGrV1Bsm4/8YAjWRXRPcOP8eh7XRJEyvZHSntbqtATJTCQ5TLa4q2xAqHkG HWJQ== X-Gm-Message-State: AOJu0YzzDL8E0MKQ+XCK/WEJrZe+twQis7/8pmQ3ErJd1SIaVaOuS4Ws lZD/UNpw1Z8cu3YoNtG9zDaKL/QIWyZWhPr23QQHO9MK7ZLCBs4JBq6pRIxXs+exkCft5mrGdxo W X-Gm-Gg: ASbGncuPyLJs4nPbbv4AhcQKZelOOhm4bKXCODUFXSAIxd+XVkW8bHNEhLA/tDM7+p5 QYhfJn4VP5ExMeq+l9yrtBaOeD7/9XIFtfnzh3cIJOLoGfMG8HRSWd3CLzcSdumJ2mlZ2vf3oaA OF0CWHi+Copx3ficO3MCY621NXF86PvH4AZxNpN2aUc66H9p0hOx4BWO2ZrP08hoGEfuLzZVhdu T5vcMAe6YOiCBqmFjagwDYoCoaF9DoJsJE7eUfKtr3Rjt10wwN/Fy2rMt/yOsfFGzzWv8zyoOey Hx3C44U1eNrLhcfTuxM7V5FqLzvVSvC12bCd2AplhpqRiE+2qb6hKquJlw== X-Google-Smtp-Source: AGHT+IGAMRTDFv0VX6mo5FfkfeeHwsWWU/dR5He2/lE4r1V/DGj7awFcvLjrsuYRhkCAF6UxyD+idw== X-Received: by 2002:a05:6a20:a10c:b0:1e1:94ee:c37a with SMTP id adf61e73a8af0-1eb2147ea81mr42426145637.15.1737649816990; Thu, 23 Jan 2025 08:30:16 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ac4907f076dsm64601a12.37.2025.01.23.08.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 08:30:16 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 00/15] Add attributes to allocation functions Date: Thu, 23 Jan 2025 08:28:00 -0800 Message-ID: <20250123163003.23394-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250110170603.538756-1-stephen@networkplumber.or> References: <20250110170603.538756-1-stephen@networkplumber.or> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 This patch series builds on the allocation function attributes added in 24.11 release. These annotations will allow for compiler to flag cases where a pointer is allocated with one function but incorrectly passed to a different free function. The current code base does this correctly now, but adding attributes will catch future bugs, or errors in user programs. For each of these patches, the free function prototype needs to be reordered to be before the function attribute of the allocator. Checkpatch perl script falsely complains in a couple patches because it doesn't really understand C syntax for attributes. v3 - fix another spot where free function prototype needs to be moved. Stephen Hemminger (15): fib: add allocation function attributes rib: annotate rib allocation functions hash: add allocation function attributes lpm: add allocation function attributes pipeline: add allocation function attributes acl: add allocation function attributes bitratestats: add allocation function attributes member: add allocation function attributes mempool: add allocation function attributes eventdev: add allocation function attributes ring: add allocation function attributes reorder: add allocation function attributes compressdev: add allocation function attributes telemetry: add allocation function attributes sched: add allocation function attributes lib/acl/rte_acl.h | 26 ++++++++------- lib/bitratestats/rte_bitrate.h | 20 +++++------ lib/compressdev/rte_comp.h | 28 ++++++++-------- lib/eventdev/rte_event_ring.h | 27 +++++++-------- lib/fib/rte_fib.h | 26 ++++++++------- lib/fib/rte_fib6.h | 24 +++++++------- lib/fib/trie.h | 7 ++-- lib/hash/rte_fbk_hash.h | 24 +++++++------- lib/hash/rte_hash.h | 21 ++++++------ lib/lpm/rte_lpm.h | 23 ++++++------- lib/lpm/rte_lpm6.h | 23 ++++++------- lib/member/rte_member.h | 24 +++++++------- lib/mempool/rte_mempool.h | 37 +++++++++++---------- lib/pipeline/rte_port_in_action.h | 55 ++++++++++++++++--------------- lib/pipeline/rte_table_action.h | 53 +++++++++++++++-------------- lib/reorder/rte_reorder.h | 23 ++++++------- lib/rib/rte_rib.h | 24 +++++++------- lib/rib/rte_rib6.h | 24 +++++++------- lib/ring/rte_ring.h | 22 +++++++------ lib/sched/rte_sched.h | 23 +++++++------ lib/telemetry/rte_telemetry.h | 21 ++++++------ 21 files changed, 296 insertions(+), 259 deletions(-) -- 2.45.2