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 E4B7546104; Sat, 25 Jan 2025 03:13:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 426A7402B7; Sat, 25 Jan 2025 03:13:17 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id CFE2F402B5 for ; Sat, 25 Jan 2025 03:13:15 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2166651f752so48078395ad.3 for ; Fri, 24 Jan 2025 18:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737771195; x=1738375995; 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=LH3zTPmd9yhyXPRRVslNzEwPH24m9foRgiQvF4c59Ls=; b=AFkcTUyk44+w+UrvJBMAN141SsCJAv4rVpl7bjdFg79yMkdVgHGEReAMdd9Cl3hKyb ssa3lbDTSIThuL2l+3nsAIHFA3Jx4n1vTo7doJiVcOgItwymBWrQ6+n2QQajtBoJMY1y cW1FRRJ4uMXdLXXnYtqD/SNXu/50C6hooDc9MRm9vgQ3GU4S5cBc25ONVdKXWSTDO3fK 79bNXAtyA3g4AxeBkdBWMsSrpWqK8kwPmf1xncSJLAjjymxQ/if7+CzSehPKdgoL3FuQ FNaTmMQXX43O6mc2WhEJhdsi3t62PqWS6tDVGKik4cTINhMqSONwYSDTVepPHE5VnZMH UW/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737771195; x=1738375995; 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=LH3zTPmd9yhyXPRRVslNzEwPH24m9foRgiQvF4c59Ls=; b=lvb1kXLESaBePusUJjgVbfXGwmWb3eQdnFciGh+ngeCrOk1uQkWUmlMCHoa8uQpBLz 6n4Z6Ebt43bx8tNFoUX9nWxa3MSIY01KxKn1D1YEUsa1qA84gE+DneFI+t1HqYihVwQS TZ7WX0Tu7r1xxhKPeRByDEyvo4xDrkP0pIvDiokYf1rC4pcc81hBSmwKajeC3ZCU/t/x zvsuI0Cv2Cor51Jnn9zzrzu8pRx+I3i5sC+2j2+xXHzCiLQc+7pnOUNE1+fk+tcsgsKz 4JrYTqCe9RG7ueawb8aFYoGwR/pDdHrhFggPlZ8v5SheIioKZl4zjliXI93Emrz2YUft AtPQ== X-Gm-Message-State: AOJu0YyiwncOfHBkth1uwkdf2YYuxOl8iJtLNO285QlJkycCelfPD52t qMmSKBcVFvAYAYUHSbXaR81xZNhE+upBtRXZ/1BXG+rjIfUtNchjg+qv5Xm6bydPgjdM5BOmOHv 2 X-Gm-Gg: ASbGncvibVTH/RqWvd4umDWcV2revCuPRS5YSc5tu7u25QIONiph66n0+Jx1mV/1XfE Lg561DlN+sPIv9fEMrVlN2NoBgkxOAFGMdaxef5trUw1XU/GcltYSN1sjTZF67kqc3d9MtgNMwl 64I2x4f0yrgrYpaJkauQQhu8q/vyioa+Kb2SYWgsYZp/igZBAe9+6jnIdm8XYTHcF8IkWypogoO oveWYCf4KRkXuhaVDcTiPcs39IEOYPkyYJ0S90/JO0UrmcKrx7t4G7IK3BvaOtCfJxq7Yqx16aY 9AGTXq7RbMhLQwHQkeLqh48L/s0mpMpiUWW0Hx+g6i5H21q+C+OmWUGG6w== X-Google-Smtp-Source: AGHT+IEQ6nLAn33YfsZDesKXtlEdaFPmivdL/DzLwtfQVgQTEzQfjEhyVKYFRulT6KsLGUTz/Er0Sg== X-Received: by 2002:a05:6a21:788b:b0:1e1:9bea:659e with SMTP id adf61e73a8af0-1eb215d4c46mr55318406637.35.1737771194808; Fri, 24 Jan 2025 18:13:14 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ac48e84e199sm2345256a12.11.2025.01.24.18.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 18:13:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 00/16] Annotate allocation functions Date: Fri, 24 Jan 2025 18:11:13 -0800 Message-ID: <20250125021305.76485-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250110170603.538756-1-stephen@networkplumber.org> References: <20250110170603.538756-1-stephen@networkplumber.org> 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. v5 - make sure rte_common.h is included in all headers using __rte_malloc 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 | 27 ++++++++----- lib/bitratestats/rte_bitrate.h | 22 +++++----- lib/compressdev/rte_comp.h | 29 +++++++------ 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 | 25 +++++++----- lib/hash/rte_hash.h | 22 +++++----- 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 | 56 +++++++++++++------------- lib/pipeline/rte_table_action.h | 53 ++++++++++++------------ lib/reorder/rte_reorder.h | 24 ++++++----- lib/rib/rte_rib.h | 26 +++++++----- lib/rib/rte_rib6.h | 24 ++++++----- lib/ring/rte_ring.h | 23 ++++++----- lib/sched/rte_sched.h | 24 ++++++----- lib/telemetry/rte_telemetry.h | 21 +++++----- 22 files changed, 338 insertions(+), 259 deletions(-) -- 2.45.2