From patchwork Wed Mar 6 20:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138055 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 9926843C5A; Wed, 6 Mar 2024 21:13:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65BBA42DD7; Wed, 6 Mar 2024 21:13:59 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 65469402EA for ; Wed, 6 Mar 2024 21:13:58 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id BEE7620B74C1; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BEE7620B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756037; bh=sGkV/jXREiNbqxBkNsCmk8nAPoHRu7KeQKgLevKCFuU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j4CeXmFHSbXhJ7/XhT9ulRgwtZjYutPYUmFSp8UAnElbAtf6U7hBOXREnGlYlV73c pxRHAFb3HbUV6mhEN5nEaUwcMmqBJE0WgqgY5FV6QHOtbbloWkv+LXA6XH0pLtFosO /DOh3x4iFl7G90NZnc+nyOJlY89p572+r/opo0zU= 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 1/6] hash: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:51 -0800 Message-Id: <1709756036-24068-2-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 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. Signed-off-by: Tyler Retzlaff Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup Acked-by: Chengwen Feng Acked-by: Stephen Hemminger Acked-by: Vladimir Medvedkin --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index 68f653f..10721ef 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -81,7 +81,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[0]; + alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[]; /** < Complementary table */ }; @@ -94,7 +94,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int From patchwork Wed Mar 6 20:13:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138057 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 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 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, From patchwork Wed Mar 6 20:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138058 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 EE90743C5A; Wed, 6 Mar 2024 21:14:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33EA142E84; Wed, 6 Mar 2024 21:14:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AD5C442E33 for ; Wed, 6 Mar 2024 21:13:58 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DA19420B74C3; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DA19420B74C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756037; bh=mwg8dgYPBvIQbhjjLQTfVrwoI3o1uNaPTZ7JTHNKWa0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=izZGko5CzsG3ft+FVsXKbIEjtjBcCv7DhunwCQZ5Ht3pohkpIZYY+j+KWsKGa9U0I Lz3pecGP2OTz9UGHAKJNp9PLz6xKt+Se2o/zGF86iBrbAtdi1krsKs9tZeDEQ0qult 4SUMPxub5w7Pb5Ss86Jrc6M64fxniXoCawkpe13w= 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 3/6] fib: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:53 -0800 Message-Id: <1709756036-24068-4-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 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. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup Acked-by: Stephen Hemminger Acked-by: Vladimir Medvedkin --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index 6d350f7..7125049 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -34,7 +34,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 36ce1fd..2c20184 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -38,7 +38,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; }; static inline uint32_t From patchwork Wed Mar 6 20:13:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138056 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 F333D43C5A; Wed, 6 Mar 2024 21:14:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CDBE42E6F; Wed, 6 Mar 2024 21:14:01 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 94C05427E9 for ; Wed, 6 Mar 2024 21:13:58 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E77F320B74C4; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E77F320B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756037; bh=C4ChNHoTZjDU7zaHOjsbjq3hGdbyETRhoART1yeyAbs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i6LgHlGBbj3qukPx5g1op70wkVosCQ+Swn7ODBuQ4MuV20N7osAXlrBp/c+raLp/n pEi9uWLomLuHKdiPHLWYKxBEQ/Yl755GtPDgLYnK443NNbJRGmDz7tPFalF+EYf9/a Gu6vW2gAcp8T2mc8WlOxN3TS5iYcy4rzXqasZUY8= 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 4/6] pipeline: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:54 -0800 Message-Id: <1709756036-24068-5-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 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: Morten Brørup Acked-by: Stephen Hemminger --- devtools/libabigail.abignore | 2 ++ lib/pipeline/rte_pipeline.h | 2 +- lib/pipeline/rte_port_in_action.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 25c73a5..5292b63 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -33,6 +33,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[suppress_type] + name = rte_pipeline_table_entry [suppress_type] name = rte_rcu_qsbr diff --git a/lib/pipeline/rte_pipeline.h b/lib/pipeline/rte_pipeline.h index ec51b9b..0c7994b 100644 --- a/lib/pipeline/rte_pipeline.h +++ b/lib/pipeline/rte_pipeline.h @@ -220,7 +220,7 @@ struct rte_pipeline_table_entry { uint32_t table_id; }; /** Start of table entry area for user defined actions and meta-data */ - __extension__ uint8_t action_data[0]; + uint8_t action_data[]; }; /** diff --git a/lib/pipeline/rte_port_in_action.c b/lib/pipeline/rte_port_in_action.c index bbacaff..4127bd2 100644 --- a/lib/pipeline/rte_port_in_action.c +++ b/lib/pipeline/rte_port_in_action.c @@ -283,7 +283,7 @@ struct rte_port_in_action_profile * struct rte_port_in_action { struct ap_config cfg; struct ap_data data; - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static __rte_always_inline void * From patchwork Wed Mar 6 20:13:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138059 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 19CB343C5A; Wed, 6 Mar 2024 21:14:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81A4D42E94; Wed, 6 Mar 2024 21:14:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 38FE3402EA for ; Wed, 6 Mar 2024 21:13:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 01D3D20B74C5; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 01D3D20B74C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756038; bh=EGzAYyHR4lf6Y48AOS2lru/JcXvrSeb2QJZdgWeMVLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BhJHLYGnNCiFe4j0qrPnb52xjtnkxXlBtPk09DITGbx/o5jaPdaX6C2OMHQkl7FHL wGwrPXMm3Qj00LHSCEcpSBVH25rIpnLlDG058e6MI/k5fA8gNig31ovZRNHjjhLS9+ l5FfSGuyWCjDRD3Xdr905y6xRp3SNTQipJ+lLk70= 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 5/6] lpm: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:55 -0800 Message-Id: <1709756036-24068-6-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 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. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup Acked-by: Vladimir Medvedkin --- lib/lpm/rte_lpm6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 46d8f71..5cc1bb2 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -107,7 +107,7 @@ struct rte_lpm6 { struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ - alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[0]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[]; /**< LPM tbl8 table. */ }; From patchwork Wed Mar 6 20:13:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138060 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 C458843C5A; Wed, 6 Mar 2024 21:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAD2E42EA5; Wed, 6 Mar 2024 21:14:06 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 55EF340647 for ; Wed, 6 Mar 2024 21:13:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0EF6720B74C6; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0EF6720B74C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756038; bh=pVs5sASd/4GjOV9VzK63KCIC/Go1jqVnhnSbRNwPRwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDJH3FkPCYjF3ppBVsQVrSpjfg+SmCP6f+t3V3eZjqIJaBrjczgTqIjxcP0slbFsL 0VnIEmYxWZVJRmlZVOaNWZ3FDCrVEgPXtddIwCMx7CS1lAxr0lOyL+9tNdqcrUeKcM z0M9r4urrVM2fNE6T6bX7L9iMZx8jg6/UwXrATyQ= 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 6/6] table: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:56 -0800 Message-Id: <1709756036-24068-7-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 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. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- lib/table/rte_table_acl.c | 2 +- lib/table/rte_table_array.c | 2 +- lib/table/rte_table_hash_cuckoo.c | 2 +- lib/table/rte_table_hash_ext.c | 2 +- lib/table/rte_table_hash_key16.c | 2 +- lib/table/rte_table_hash_key32.c | 2 +- lib/table/rte_table_hash_key8.c | 2 +- lib/table/rte_table_hash_lru.c | 2 +- lib/table/rte_table_lpm.c | 2 +- lib/table/rte_table_lpm_ipv6.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/table/rte_table_acl.c b/lib/table/rte_table_acl.c index 6f3be6f..78779bb 100644 --- a/lib/table/rte_table_acl.c +++ b/lib/table/rte_table_acl.c @@ -48,7 +48,7 @@ struct rte_table_acl { uint8_t *acl_rule_memory; /* Memory to store the rules */ /* Memory to store the action table and stack of free entries */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; diff --git a/lib/table/rte_table_array.c b/lib/table/rte_table_array.c index 71aada4..84b5d67 100644 --- a/lib/table/rte_table_array.c +++ b/lib/table/rte_table_array.c @@ -40,7 +40,7 @@ struct __rte_cache_aligned rte_table_array { uint32_t entry_pos_mask; /* Internal table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t array[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t array[]; }; static void * diff --git a/lib/table/rte_table_hash_cuckoo.c b/lib/table/rte_table_hash_cuckoo.c index 04668ca..388eae9 100644 --- a/lib/table/rte_table_hash_cuckoo.c +++ b/lib/table/rte_table_hash_cuckoo.c @@ -44,7 +44,7 @@ struct rte_table_hash { struct rte_hash *h_table; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c index ed93f24..91e5037 100644 --- a/lib/table/rte_table_hash_ext.c +++ b/lib/table/rte_table_hash_ext.c @@ -100,7 +100,7 @@ struct rte_table_hash { uint32_t *bkt_ext_stack; /* Table memory */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key16.c b/lib/table/rte_table_hash_key16.c index 6141815..67b77c1 100644 --- a/lib/table/rte_table_hash_key16.c +++ b/lib/table/rte_table_hash_key16.c @@ -85,7 +85,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key32.c b/lib/table/rte_table_hash_key32.c index c8f59ad..1aa86c6 100644 --- a/lib/table/rte_table_hash_key32.c +++ b/lib/table/rte_table_hash_key32.c @@ -85,7 +85,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key8.c b/lib/table/rte_table_hash_key8.c index cd91a0e..c8d72b3 100644 --- a/lib/table/rte_table_hash_key8.c +++ b/lib/table/rte_table_hash_key8.c @@ -81,7 +81,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c index 7b67b99..801e48f 100644 --- a/lib/table/rte_table_hash_lru.c +++ b/lib/table/rte_table_hash_lru.c @@ -77,7 +77,7 @@ struct rte_table_hash { uint32_t *key_stack; /* Table memory */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_lpm.c b/lib/table/rte_table_lpm.c index 89f8323..3e10c14 100644 --- a/lib/table/rte_table_lpm.c +++ b/lib/table/rte_table_lpm.c @@ -48,7 +48,7 @@ struct rte_table_lpm { /* Next Hop Table (NHT) */ uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS]; - alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[]; }; static void * diff --git a/lib/table/rte_table_lpm_ipv6.c b/lib/table/rte_table_lpm_ipv6.c index 3dec5dd..c1a7412 100644 --- a/lib/table/rte_table_lpm_ipv6.c +++ b/lib/table/rte_table_lpm_ipv6.c @@ -45,7 +45,7 @@ struct rte_table_lpm_ipv6 { /* Next Hop Table (NHT) */ uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS]; - alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[]; }; static void *