From patchwork Thu Feb 29 22:58:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 137572 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C7D2D43BAD; Thu, 29 Feb 2024 23:59:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE1C442FC5; Thu, 29 Feb 2024 23:59:00 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C357E42DCB for ; Thu, 29 Feb 2024 23:58:55 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id CF29F20B74C3; Thu, 29 Feb 2024 14:58:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CF29F20B74C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709247534; bh=+cryiBIHSDTN39PyKEHWV24moossZjvQ07okD5JLAWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AuQvmhhSWKTmyf6fCViFxBniavW+bcARP89rbZ8PBeSI6EVTI2yU1TT+J1vFpT/BD sbtVPuziQDMtJqgscDsMX6pPJDN1g+LzUGqJOO2ALuV30GCK1+mTlVcvEafgyyouJn sHGls3OCYMCLrhlbQfNznc2R4pUTHeFjWozsZ5BQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Cristian Dumitrescu , Honnappa Nagarahalli , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , mb@smartsharesystems.com, fengchengwen@huawei.com, Tyler Retzlaff Subject: [PATCH v4 2/6] rcu: replace zero length array with flex array Date: Thu, 29 Feb 2024 14:58:49 -0800 Message-Id: <1709247533-32698-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709247533-32698-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1709247533-32698-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 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 Zero length arrays are GNU extension. Replace with standard flex array. Add a temporary suppression for rte_pipeline_table_entry libabigail bug: Bugzilla ID: https://sourceware.org/bugzilla/show_bug.cgi?id=31377 Signed-off-by: Tyler Retzlaff Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup Acked-by: Chengwen Feng Acked-by: Stephen Hemminger --- devtools/libabigail.abignore | 3 +++ lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 645d289..25c73a5 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -35,5 +35,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [suppress_type] + name = rte_rcu_qsbr + +[suppress_type] name = rte_eth_fp_ops has_data_member_inserted_between = {offset_of(reserved2), end} diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index e7ef788..af9cbea 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -106,7 +106,7 @@ struct rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - struct rte_rcu_qsbr_cnt qsbr_cnt[0] __rte_cache_aligned; + struct rte_rcu_qsbr_cnt qsbr_cnt[] __rte_cache_aligned; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array,