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 85F7243355; Fri, 17 Nov 2023 17:21:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90DA842D2E; Fri, 17 Nov 2023 17:21:03 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id F2623427E3 for ; Fri, 17 Nov 2023 17:20:57 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1cc0e78ec92so16794605ad.3 for ; Fri, 17 Nov 2023 08:20:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700238057; x=1700842857; 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=ENHtGgd+53J735ew6Irhe48ejFc2aCrqrU6Z0tmP3sc=; b=DZnfl0tgzcNb10UkAQZxP7ulGt/CKLzT0VnWF6f1qQNIHvM+BsQTqyuDXqjMU7MimI gzUUm9w3PlYYqbaTd8DPsbFDcI5rqxQ0MJFvjKb50p66F8kMeK5LyPHrEELJT/1F22v3 TG1U0+kJsfFhKZstBhGrCrEo9eewcl+w6d8ZCDjGnDte07dzvwo1JWKD2YbWvEflXH3m 0bVD1NANqQzLRG8mKLM6z4ZTdwGjxVZHHZRCvwyy8dzuEzekVgPhHMhAnhVLYd0V38SW mvsnW58xd36MrR3iGW5jL58MsLM9repzSpQcGw1xN9EgPTQ4DKAT1r0LqVh7VOBo4F6p t1yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700238057; x=1700842857; 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=ENHtGgd+53J735ew6Irhe48ejFc2aCrqrU6Z0tmP3sc=; b=d9OFS2hBNrb9aAskDxHE1/6XuXZT/mGK8eBkwxkuDBOeOsfDE92B4BMqY9Cq8RmJaw opX/IIh9TnTKhu4cxJlxH1OSDKsjGcd3BzFhMCaETxrmbKOdFlk/pC8eHidLcIIhhDdI HGfSDsrwJYOy47iMdJOLETU1sC+GUDgRSZtYCp4tl+iO8RZLWTxT8TIpDeoz9yPOSg6q vOeNWi063gO0Z8ZOUT1wdrh5vKPMczAIYmIeW6dZsZwQMPZOSIM2JkogPNh3Y1c9I3Q/ GJnLdz5jx7N7gQQRSLTg9eIfPKLxJCR3DdvsDdfycUIKBOyELh4ClGhbkwf19OUhhStn Myew== X-Gm-Message-State: AOJu0YzKvt6tjUACmtFsxp41VI6VtF1IfA7omaoG4qIxhAHinfTQ4LaD PsKRVfuOM4Ny4uBJMULqaG6YQ3mOwZVtZze8mQLnVA== X-Google-Smtp-Source: AGHT+IHgNq6SVAnjmGmAjfwKLukxSpqqumr+DTBbgLq9ehs/U6eGPaMohVgv/6sLRmbJdikmr9jPMw== X-Received: by 2002:a17:902:c409:b0:1cc:6cc3:d9ba with SMTP id k9-20020a170902c40900b001cc6cc3d9bamr78900plk.4.1700238056847; Fri, 17 Nov 2023 08:20:56 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id q15-20020a17090311cf00b001c61df93afdsm1564759plh.59.2023.11.17.08.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 08:20:56 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH v3 07/10] net/mlx5: replace zero length array with flex array Date: Fri, 17 Nov 2023 08:18:33 -0800 Message-ID: <20231117162040.241466-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117162040.241466-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20231117162040.241466-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 Reviewed-by: Tyler Retzlaff --- 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