From patchwork Mon Feb 12 22:36:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136621 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 4BD7343AFE; Mon, 12 Feb 2024 23:36:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 923C0402AD; Mon, 12 Feb 2024 23:36:14 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4CE6E402AA for ; Mon, 12 Feb 2024 23:36:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 448FA207ECAA; Mon, 12 Feb 2024 14:36:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 448FA207ECAA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707777367; bh=sDCUgC7VawA4ucmlCJ1kZVqWfwA+fF21q1DIcSfk2S4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lp3EiuUdX4sS19iaAApC6ZgNNW8E06oWY/OcFxRGOY0lDTD/G+/nfC2zUHhpjVeuO 3Gbm68wFuYh7zk36rErqgka8CnaqqBWWRGaCP+SxTlda56bOh+msRPaHXCAlCmcWj6 IhTriHYprAm9LO5lzXI4Ul1n0lqp0czDgSG65Cfk= 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 v2 1/4] hash: replace zero length array with flex array Date: Mon, 12 Feb 2024 14:36:03 -0800 Message-Id: <1707777366-26000-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1707777366-26000-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 --- 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 e8de071..1982051 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -80,7 +80,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__ uint32_t compl_table[0] __rte_cache_aligned; + uint32_t compl_table[] __rte_cache_aligned; /** < Complementary table */ }; @@ -93,7 +93,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 Mon Feb 12 22:36:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136618 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 3D80643AFE; Mon, 12 Feb 2024 23:36:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DDD040DD8; Mon, 12 Feb 2024 23:36:11 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2C38E4026E for ; Mon, 12 Feb 2024 23:36:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 51BD3207ECAB; Mon, 12 Feb 2024 14:36:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 51BD3207ECAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707777367; bh=4y4OtWuA3tTCLiAKuqR1q+OWkeCDxaaAErXYFd1fQUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7nT5nrVRP+PHjgyJuc9qQ/jDXuWiyyUa+JuTKCU5YDeAAAlz83bFc7LJ1Xi6gSOJ c6xXmCDsfqwVK+xjTUZWwtPWlOCqpGYPXwQT4prLuGCAjS9dLuFHL7LUXqxeXEdnGt +c/Byfpja+Eq1DmuK79N+jSh0+pKjsaBKSI99j6I= 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 v2 2/4] rcu: replace zero length array with flex array Date: Mon, 12 Feb 2024 14:36:04 -0800 Message-Id: <1707777366-26000-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1707777366-26000-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 --- lib/rcu/rcu_qsbr_pvt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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_ */ From patchwork Mon Feb 12 22:36:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136619 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 01E2C43AFE; Mon, 12 Feb 2024 23:36:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56B1B40E2D; Mon, 12 Feb 2024 23:36:12 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 32AE340274 for ; Mon, 12 Feb 2024 23:36:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5E927207ECAC; Mon, 12 Feb 2024 14:36:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5E927207ECAC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707777367; bh=EFAIJOeW8AVl8l8sMKekN2GuBUZB91JlpB8wKBChi38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sISyBAM2Ds4bn80Nn0PyX+lCKaDRE6cWRrZuSH3YZ76IMef+mI3YgCDDTfj4BJb5P OISU9psBW8Ugz/JtkAZApe/+JWfaWw5/024UNFS5r6NDl4U/JubD3QKT7+xm1fi1OB Icct3cZ2B3i/uSGudBz2AwwqAyKocy4hECwlLDKA= 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 v2 3/4] fib: replace zero length array with flex array Date: Mon, 12 Feb 2024 14:36:05 -0800 Message-Id: <1707777366-26000-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> 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 --- 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 b0d1a40..5a7b6dd 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -32,7 +32,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 3cf161a..71ed191 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -36,7 +36,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline uint32_t From patchwork Mon Feb 12 22:36:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136620 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 1667043AFE; Mon, 12 Feb 2024 23:36:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77A7140E64; Mon, 12 Feb 2024 23:36:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 446AE40294 for ; Mon, 12 Feb 2024 23:36:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6C433207ECAE; Mon, 12 Feb 2024 14:36:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6C433207ECAE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707777367; bh=pHeSyGVRcuutiQ2BHOkiSzkvbCKpYtiiNMjF5p291eI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=prR64cHg+tZn6wEiKXGC5DiVZJDzoFDzCRuiBoFuwwr8q1Es+iGyb/9aRW9uW3jR8 fMpP06zMCSj9gqV1gSYSFLZM0Pz0F4smlLJMHaufrdqNj3yrHb03PwbVcE42YqhRgu s4ooDkSf59g8lto+zd3uI3ECKOjgaUQyDw4JYp64= 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 v2 4/4] pipeline: replace zero length array with flex array Date: Mon, 12 Feb 2024 14:36:06 -0800 Message-Id: <1707777366-26000-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1707777366-26000-1-git-send-email-roretzla@linux.microsoft.com> 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 --- lib/pipeline/rte_pipeline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[]; }; /**