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: david.marchand@redhat.com 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