From patchwork Wed Jan 24 22:17:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136120 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 04D9A439BC; Wed, 24 Jan 2024 23:17:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26775427D8; Wed, 24 Jan 2024 23:17:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 90AD4402C5 for ; Wed, 24 Jan 2024 23:17:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id ABAD020E567C; Wed, 24 Jan 2024 14:17:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ABAD020E567C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706134659; bh=cLfCgY6rQReiCqNJG3OLKVdjZ8kshzK2DSBMueUUPFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pJW0CMYbQGNLxvEV0BhABHjj0ZIUAlA9hB5VUo5k7s/lxOvMjvKMkudGwE7aZsV6H kxB8H61S8PpqATFEn8GHmGeMh0KkmDoXXmftQPaWbbO3uCq0MEKsNJW6q+SBO4Zof0 K/owzDKsx2y7ofPVaN28h4Tf6tu/DeD3ACXmvhWc= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Honnappa Nagarahalli , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , Stephen Hemminger , Tyler Retzlaff Subject: [PATCH 1/2] hash: replace zero length array with flex array Date: Wed, 24 Jan 2024 14:17:36 -0800 Message-Id: <1706134657-17446-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-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 Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup --- 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 Wed Jan 24 22:17:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136119 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 2D4DD439BC; Wed, 24 Jan 2024 23:17:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E40240ED1; Wed, 24 Jan 2024 23:17:43 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 74212402A6 for ; Wed, 24 Jan 2024 23:17:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B8C0020E5681; Wed, 24 Jan 2024 14:17:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B8C0020E5681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706134659; bh=GfXIwUgPLfC5qKlOgH67LAcucjSEsklyD4/5ZwCSpGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DWWgm7HDaumuyyTkgsgxWhWLYGYitJ9ZPAjxisK6BK9YjsWwlBtGfNqWCGii7VMNO 8iLjDmOhnUzpWRhM0eZ1eZhsMx/FwPXqy6p1RysDPvQhmWjSfm/RhaxEfJWmJMeiG8 t6y1hlaHUMgzJHyY+9LylDQGiOWtIlVbUrEFL1R0= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Honnappa Nagarahalli , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , Stephen Hemminger , Tyler Retzlaff Subject: [PATCH 2/2] rcu: replace zero length array with flex array Date: Wed, 24 Jan 2024 14:17:37 -0800 Message-Id: <1706134657-17446-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-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 Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup --- 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 Thu Feb 29 22:58: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: 137569 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 C849F43BAD; Thu, 29 Feb 2024 23:58:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C9D6427D9; Thu, 29 Feb 2024 23:58:56 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A98C6427D9 for ; Thu, 29 Feb 2024 23:58:55 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E9CFF20B74C5; Thu, 29 Feb 2024 14:58:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E9CFF20B74C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709247534; bh=nsS8qDHpwhRrqLavDeQRqr9or2xy7NHBSoTznJLvcsY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X8Np85Zu6K15rDg9egzIPHSlocsG06vsXDo6+t04PrsrVImWTJebY6PCVXYw7RO1c FHabWmkEVnyzW7ux+qqgiatxd0S/v1FI/WsrnHoTynssvrguRhGKHrot/0NlHahaxc 3XC0OtDfRmhxXjBTQ9xetuugEK4d+ESiDTN4JhRY= 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 v4 4/6] pipeline: replace zero length array with flex array Date: Thu, 29 Feb 2024 14:58:51 -0800 Message-Id: <1709247533-32698-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709247533-32698-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1709247533-32698-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 5818973..ebd9b9a 100644 --- a/lib/pipeline/rte_port_in_action.c +++ b/lib/pipeline/rte_port_in_action.c @@ -282,7 +282,7 @@ struct rte_port_in_action_profile * struct rte_port_in_action { struct ap_config cfg; struct ap_data data; - uint8_t memory[0] __rte_cache_aligned; + uint8_t memory[] __rte_cache_aligned; }; static __rte_always_inline void *