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 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 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. Signed-off-by: Tyler Retzlaff Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup Acked-by: Chengwen Feng Acked-by: Stephen Hemminger --- 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 -- 1.8.3.1