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 31EEC43C5A; Wed, 6 Mar 2024 21:14:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECDA142E48; Wed, 6 Mar 2024 21:14:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9C5B042DD7 for ; Wed, 6 Mar 2024 21:13:58 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id CC66020B74C2; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CC66020B74C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756037; bh=vnTiHCqdQ0qK8OamOlmqZxxTQZJurOaBILiSgo8M5TY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DLjySuKAycHXDLrzxTWG7ZzNNgEizAc5kHxy93lbBcnBxNizkQ+srCXxuOG9eUkNv PjT3xwfzaFaHgT6zxUGJsBeXFpZBILksjTbsVn+R2q5uODBwZaUCQPhD65AUVawl5Q wVVH2ZZImEoRGw5G9Yds5DFsOqykFqaPPZct3yQQ= 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 v5 2/6] rcu: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:52 -0800 Message-Id: <1709756036-24068-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709756036-24068-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1709756036-24068-1-git-send-email-roretzla@linux.microsoft.com> 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 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 0506191..ed3dd6d 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -107,7 +107,7 @@ struct __rte_cache_aligned rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - alignas(RTE_CACHE_LINE_SIZE) struct rte_rcu_qsbr_cnt qsbr_cnt[0]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_rcu_qsbr_cnt qsbr_cnt[]; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array, -- 1.8.3.1