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 3628343381; Mon, 20 Nov 2023 18:10:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC59742E56; Mon, 20 Nov 2023 18:10:04 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id C0C6E42E40 for ; Mon, 20 Nov 2023 18:10:00 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6c33ab26dddso3952912b3a.0 for ; Mon, 20 Nov 2023 09:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700500199; x=1701104999; 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=gu/I48NnJE0tjOGD3OhEB8E8ESrmmEJvWCBDv7JyotU=; b=TzWny6e86v3HoYAM7WDEBD9dkJDMqH3xRX5/Yz6ixSs2rLoPHz6lx1W0gVNZASgISf oxMYo5b9TE80ffSoheY9WlWgFD8UiwEm6NHxuZfvb5sOrUqbsD3N8VZLCorO4Y1ga5QL kTubAB3EdZ8CX8DkrkQO8gKyEtIWBkycxmuNrR1Kws/yYNO1qPLC1463k1lOMEhnmfTn 6wwoY6MZXFZgHCm991U6OeV4WusoyX+nWnKUJax2QwDHUgvZR+19fEiUpuCnRaY78bvM APFl2mOiuiOdN6AZJp+TT5Mj55NTpIvO0nPT4UQhI1wkAj+VyMqDFTEUd5bnkHrkLfoB 6ykQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700500199; x=1701104999; 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=gu/I48NnJE0tjOGD3OhEB8E8ESrmmEJvWCBDv7JyotU=; b=h0wE+HvBDlN7gWWDlSwQh6dCxtXuPReV38K3Radu9Hmm1ywDvewLSFk1aocV2ouLPt 6C8fhHgGTddeez2ehCgEbNr9uhOFIkLfQ6qdoQb205izE6SDqKQt0OKQaj4P0iGD+p99 wql4d4wE035nW17fEFQl5oTN2tRhjGJkshR9+OWsjBbvvMmd5aiPwtmaWvkuh0FTUMnv OcvJvqbC2z5bT3H7qQnvfeb8xGVF5WBgP7qGgmssq+tWPf8+q0dVxsU5jQsBINLdMpzd BwQQADlUnETSt5WqVeHXdLCTlR4vH3gWJ2Hd6xwtE8lDRNGWcBCJ9rU/o5DKiWDdSTvW dVdQ== X-Gm-Message-State: AOJu0YybOevpjo+N6Jads6d48KeAD88TCErh46LOtyQM/wtCe5hTYOYJ b+Fn6Kjph5ifybZCg3668FiPJ14SWC9eykpYcwQ= X-Google-Smtp-Source: AGHT+IEYK6WRN27QBokr1FA98cjvYGmkdF3OwnZBs/B5eTGwaV95iimVofE3HOCrb48CFhBRaqG5xQ== X-Received: by 2002:a05:6a21:6d88:b0:18a:b5c3:55c1 with SMTP id wl8-20020a056a216d8800b0018ab5c355c1mr1216744pzb.57.1700500199412; Mon, 20 Nov 2023 09:09:59 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p18-20020a62ab12000000b006cb7f9da229sm2894681pff.202.2023.11.20.09.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:09:58 -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 v4 07/10] net/mlx5: replace zero length array with flex array Date: Mon, 20 Nov 2023 09:07:02 -0800 Message-ID: <20231120170942.197172-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231120170942.197172-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-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 | 3 ++- 4 files changed, 6 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..b1e8ea19a2a1 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -171,11 +171,12 @@ 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; /* TX queue control descriptor. */ +__extension__ struct mlx5_txq_ctrl { LIST_ENTRY(mlx5_txq_ctrl) next; /* Pointer to the next element. */ uint32_t refcnt; /* Reference counter. */ -- 2.42.0