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 388914334C; Fri, 17 Nov 2023 05:05:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD56D40DF8; Fri, 17 Nov 2023 05:04:53 +0100 (CET) Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by mails.dpdk.org (Postfix) with ESMTP id 983D040A80 for ; Fri, 17 Nov 2023 05:04:50 +0100 (CET) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-587b1231dbeso805667eaf.3 for ; Thu, 16 Nov 2023 20:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700193889; x=1700798689; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BW420YvD1qx1IzdBTn9ZDqrxYuHNyAD7HVBrK7Yw9zQ=; b=oAKKiW4Agc1oh9M4REutzbcBBQ6jIvDdAfSsZEReluBao7QOkQ+NFrcySI1WxdqyyM Sa7NLGZnadrM0dh8u+lPepZxbVGgvkdRwQS0sjG4P2A2kA9qbxiWRR35oifb+uPNRtZP 7xPT4Bs8zZUp0WrxQgjLwnJcuJUYf0sDEq+DLVpTMNAzn4syxLLcAKFYuokcdirQn9wS uXM2M8Wb6up/56qDN87md+/P5yyDWekySac7FAbM+PEzcrRbWyxD3kAIAR7fDEre4kTF GczPArJVgt4v/f9EeknDI5jRidaRkqevpwZjGS2vxowl/3oJi5nXtQvsQFoJfdm381Kn 5tDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700193889; x=1700798689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BW420YvD1qx1IzdBTn9ZDqrxYuHNyAD7HVBrK7Yw9zQ=; b=oXig+wU9scu8+DYshKc4acdyz+JZWxXH98GKDlrS8162FEtOrdfdfBh2nBOuTF3599 JUGszJuqdL4O+tmPMV4Sm9q7GMTLohM45cu1vENLTq7DVt8K6Xpde5X1VYvViwAzsp6H EwMYgEfBWRYDCd5uPoTug6ka8vHHlK9uu1t7SMAvrERVDXjHAvgB5ReJZbndHA7hcRFl KgdnwMHsmuFPNUHJx9wB6gi7A9wtNZF1zwPJOiVnlRf5aV3NocJ//Q2aBD0Dswo8aaea 9gSi0NZ7ZoiKRH3s+uaN1eBykmgNrtqE+IxGJxQYPjvHB8M/fz3mMCMYT8n3icF3ckMa Hx4A== X-Gm-Message-State: AOJu0Yw+VZNYbBL5dkiVye6iI1U/FjgswwlFh1hdTxmhEBgDR063DRdP EgkjM3E1xKuNHP2RraiKWdIG2icjFaxY5aShLnlDAg== X-Google-Smtp-Source: AGHT+IGoCxUgBdxSvJKDrhuz3Z9+b7R38d/BrOA7TmSe4gbh1pHcu/KGt5+qvMPky2e9o2mwZon0lw== X-Received: by 2002:a05:6358:6f04:b0:169:98e4:aeeb with SMTP id r4-20020a0563586f0400b0016998e4aeebmr12370629rwn.23.1700193889559; Thu, 16 Nov 2023 20:04:49 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id s11-20020a65644b000000b005bcebc93d7asm389873pgv.47.2023.11.16.20.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 20:04:48 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH v2 07/10] net/mlx5: replace zero length array with flex array Date: Thu, 16 Nov 2023 20:03:19 -0800 Message-ID: <20231117040432.131737-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117040432.131737-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231117040432.131737-1-stephen@networkplumber.org> MIME-Version: 1.0 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: Stephen Hemminger --- drivers/common/mlx5/mlx5_prm.h | 2 +- drivers/net/mlx5/mlx5.h | 4 ++-- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_tx.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 9e22dce6da13..932b89bd79d3 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -5181,7 +5181,7 @@ struct mlx5_ifc_flow_context_bits { u8 reserved_at_e0[0x40]; u8 encrypt_decrypt_obj_id[0x20]; u8 reserved_at_140[0x16c0]; - union mlx5_ifc_dest_format_flow_counter_list_auto_bits destination[0]; + union mlx5_ifc_dest_format_flow_counter_list_auto_bits destination[]; }; struct mlx5_ifc_set_fte_in_bits { diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index f0d63a0ba5f5..89d13900fd3c 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1308,7 +1308,7 @@ struct mlx5_aso_ct_pool { }; struct mlx5_aso_sq *sq; /* Async ASO SQ. */ struct mlx5_aso_sq *shared_sq; /* Shared ASO SQ. */ - struct mlx5_aso_ct_action actions[0]; + struct mlx5_aso_ct_action actions[]; /* CT action structures bulk. */ }; @@ -1325,7 +1325,7 @@ struct mlx5_aso_ct_pools_mng { rte_spinlock_t ct_sl; /* The ASO CT free list lock. */ rte_rwlock_t resize_rwl; /* The ASO CT pool resize lock. */ struct aso_ct_list free_cts; /* Free ASO CT objects list. */ - struct mlx5_aso_sq aso_sqs[0]; /* ASO queue objects. */ + struct mlx5_aso_sq aso_sqs[]; /* ASO queue objects. */ }; #ifdef PEDANTIC diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 6dde9de688b9..b35079b30a6e 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1257,7 +1257,7 @@ struct rte_flow_hw { cnt_id_t cnt_id; uint32_t mtr_id; uint32_t rule_idx; - uint8_t rule[0]; /* HWS layer data struct. */ + uint8_t rule[]; /* HWS layer data struct. */ } __rte_packed; #ifdef PEDANTIC diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index e59ce37667ba..2045e5174e6d 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -171,7 +171,7 @@ struct mlx5_txq_data { struct mlx5_txq_stats stats; /* TX queue counters. */ struct mlx5_txq_stats stats_reset; /* stats on last reset. */ struct mlx5_uar_data uar_data; - struct rte_mbuf *elts[0]; + struct rte_mbuf *elts[]; /* Storage for queued packets, must be the last field. */ } __rte_cache_aligned; -- 2.42.0