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 0137D46130; Fri, 24 Jan 2025 19:17:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6793540ED8; Fri, 24 Jan 2025 19:17:20 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 352A84028C for ; Fri, 24 Jan 2025 19:17:17 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2ee8e8e29f6so3482929a91.0 for ; Fri, 24 Jan 2025 10:17:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737742636; x=1738347436; 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=wLXdjm7/KbJ79CxMqNAXvEkxxsqeyTr07UTcLz6RukM=; b=DENXzh2RGcfv0HILa0m6dhqjbn2cbdHaat1FWhtD2x4g4E0c5oOX8dBxZ/tiJgB1r4 nNa2wZqQ3srps6SF2z4b4W2nYga2BYgYMIrym0d676peN5htMAisUzETYv3DQcm2Kj69 CL33XKp0Cw0HLXuarP9vj9mFiY4+av2DhGShsY2zQGS+LAH3PNt9VhYJiLLKB4O6kzfE Lio2XSTBjmQ9OkyabbewElj/ZKw0TRJ2ZRyEEfQvyiwVMhAj6S09M+L4teci0nqDUXQJ ejyOTsAox3MHie1yQ2gj2YF1RzfyVAZCYbvlvQCbqxObGkPKzSfyTLdWR9jtWwEc123B riwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737742636; x=1738347436; 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=wLXdjm7/KbJ79CxMqNAXvEkxxsqeyTr07UTcLz6RukM=; b=xEelclgw1BITUXBZo39vRyPxYQ/uZAjX0StWlhsUi9gikaQYOd/MTbLTDVD489/d+k MO/Yrzyu6tUj60w6lgbBwFBsp/IKcWdR85fnPx/AnXaTMINf9Oa/IIw1UtXRj/atcXvV l6UAWcjajSa/BeNr2xFaFYEzVkSFbQb0/5qj6eg+6JTGFYxLy9gMdVJz3KRw0YwdkifU TmLUEaFySX1fQXiZqGzpZ/AwyVkov6jDzCVsQpZojUBXajGssRpoD4zjJZN5nxB3E4pt bK5klbXt9fSIjdzWLrub48KlhpFp6hke5rJL3fGrzFrqysquU4gPnp1sK4/Z+R9JGUkx uJyg== X-Gm-Message-State: AOJu0YxTM3TQeEE/hkuPfc0Bh07ZojBUdcMPSs0Wa15w2/LJTpQ/nSAy dSiR1fiACr0nZ4KRcqsVrbBal7B5Pn0w8GxiWh3oNDEFy9+6kTeh5oOSS8J5hG+qE9ZXGfRDZxI d X-Gm-Gg: ASbGncuXlp3u97AN6uy/iH8g9+AiEJnAAc1bmaUD1X5ZP89p3nlDNK5TvCa/AwMjcMa 1vsZbGhc0/NI5euRBpCoIxbPXYISmVm2CC/y9XSupV7y+BeAVr1dArFgDVrhM5pdpTCfnxEVPOz 32re62ZS2/gtUBbJDfcLTW65d00CIU/Cn4JYDtVqz21CawCdqer25ZkdospmvZPz1LmrR3POCk0 gJsH87Q3InOoUH3v+qYj6eYlumfm48GPYbbgMYoh8+JX7z+x15MswBRNTn9PaEdZrUnF53GIaLr 3OY1mfLNw1w79DVwDdCZfkPX4t2FFJwmPGK1gRSPWbDpRDlIQA0ezfJJMQ== X-Google-Smtp-Source: AGHT+IHTqxReMwZQNNH76rIujLKI6FprW+CtVkZGvvABv0w8ubw4//XF2ts+EcgSnSMhK1dZFbfHXw== X-Received: by 2002:a05:6a00:3493:b0:725:9cc4:2354 with SMTP id d2e1a72fcca58-72daf950b6fmr42036826b3a.10.1737742634910; Fri, 24 Jan 2025 10:17:14 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a6b2ed8sm2184477b3a.41.2025.01.24.10.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 10:17:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 00/16] Add allocation function attributes Date: Fri, 24 Jan 2025 10:14:51 -0800 Message-ID: <20250124181704.86567-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. v4 - add release note - add rte_common.h to bitrate.h to fix build Stephen Hemminger (16): 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 doc: add release note about allocation attributes doc/guides/rel_notes/release_25_03.rst | 30 ++++++++++++++ lib/acl/rte_acl.h | 26 ++++++------ lib/bitratestats/rte_bitrate.h | 22 ++++++----- 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 +++++----- 22 files changed, 328 insertions(+), 259 deletions(-) -- 2.45.2