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 629F4460EC; Wed, 22 Jan 2025 18:35:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BD9A4060B; Wed, 22 Jan 2025 18:35:51 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 042D24060A for ; Wed, 22 Jan 2025 18:35:50 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2161eb95317so130159465ad.1 for ; Wed, 22 Jan 2025 09:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737567349; x=1738172149; 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=yJZns+UBe2bqlcHQjq5WwGGWsGbFWTprr6g54bnXScM=; b=UFfZVqWHelxJdlGUqVZknZ6hxB8mEgKdvy8k1KxlaWH8+Kxe88iShq55g8CuBETYRd drZKOaM+4FM3At5QeDcZJTHOHoDhpfo4Ysf5zjlRgdaMKMXktcb1gnf4JhjBz1CNOMlY 8xXvbgOKxjlurH4/c8drQzgEbc0EcswWQScLGtvIYpNgurMX0PfgY2n2XLu4dlo6nLIQ rtWXn3Tlq/aDGGwI52Ah4sCeEsGN39GR6g/WoPQMx46O+UDuFy4xK2LTIEssc2m2RH0y ev6LohuxbTijX+MGX22uJCkMwZooc+gmgv6DmwLWC52hwpBzGQZZWPaF5o41YGLC9oD7 vIUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737567349; x=1738172149; 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=yJZns+UBe2bqlcHQjq5WwGGWsGbFWTprr6g54bnXScM=; b=DWagk/6eC/Fj1gQ6fudYYAQPjN+mgynNUhzetDA5g9Rw0DBWhCLLsGNba0bRpl6m4Y VpOAXkgzxcbSQeGsoFuOtijzO8P6cMwoqdw9WEDx2Sw4KEyGpK8wl1uRm/A0YDedJclK 23sT1SQI/xBgaQy3M/fFmP07l8zvHJd+9hHggG50z97r9KLcE3rbCw1lLYN1+DhDSZVf 2QNX7yXoJY5A/8E5hNw0y9UjGFBiMs75LuojNVTNzECCnnBO/DZPGWXf0oO3rkze01ka 3eoRTCji9vBM+x4ka7jQAZweL0MIfpYoQcCeqPnk9Y2esp2c3pyB1ng44sCVujanj9+A baFw== X-Gm-Message-State: AOJu0YzGNzkuP0qmX9ntbTiyWKvevY51fgrOOvbwhlxDVlU8xZmyrGZB eqkZ/8nV/m3XYFC5cKPCCFBdbJaBmg7M+DQPkJsFTvCHSdOjN2s4becgRM55C5oGZwGameDAAM8 G X-Gm-Gg: ASbGnctjAhWUSouPqsxtGmSuEbgMULue6jV14rXLsXF5FMZ9nUDrUPyrQX4LuMAR+yb yunNDyEinaryLvGAzEf8sNE588uu8WZrdLrtwQZQ/+LMzAnF9PDzzEACVFKnorrI3MTBkS3x12a JGWTwjF6jLWidw37FdOAymQNWcIDmXN8GEJrR5v1oTEJM8ra/nU4ONodth0PqcSfW2MOMas95wB xabzBqdhKtaNK9xlVmgFTQBjhPxuyka6AbWAA4skvn+d1nKH0jlhzSgh0eZQHxGALJDhAjOYxqE 0q1Z9ynM/sKhxHYGpZpyClkIjVmc3PFSDJ6CDAg4zl4ZTC4= X-Google-Smtp-Source: AGHT+IEZXT2OJCgfuGomGRVGi/K5ApzBGAJLwZT/VecoJTyYc+qsY8uwpoYSa5WlXzidO9cyzi2srw== X-Received: by 2002:a17:902:ce09:b0:216:2f7f:ff69 with SMTP id d9443c01a7336-21c351bcf0dmr361640835ad.5.1737567349014; Wed, 22 Jan 2025 09:35:49 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3bc64dsm97469285ad.122.2025.01.22.09.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 09:35:48 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 00/15] Add attributes to allocation functions Date: Wed, 22 Jan 2025 09:32:44 -0800 Message-ID: <20250122173521.305108-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250120180550.198121-1-stephen@networkplumber.org> References: <20250120180550.198121-1-stephen@networkplumber.org> 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 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. v2 - fix issue with bitratestats prototypes 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 | 4 +-- 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, 288 insertions(+), 251 deletions(-) -- 2.45.2