DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Subject: [PATCH v3 07/10] net/mlx5: replace zero length array with flex array
Date: Fri, 17 Nov 2023 08:18:33 -0800	[thread overview]
Message-ID: <20231117162040.241466-8-stephen@networkplumber.org> (raw)
In-Reply-To: <20231117162040.241466-1-stephen@networkplumber.org>

Zero length arrays are GNU extension. Replace with
standard flex array.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 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


  parent reply	other threads:[~2023-11-17 16:21 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 17:21 [RFC] eal: use _Static_assert() for RTE_BUILD_BUG_ON Stephen Hemminger
2023-11-11 17:52 ` Morten Brørup
2023-11-13 16:30   ` Tyler Retzlaff
2023-11-13 16:28 ` Tyler Retzlaff
2023-11-13 17:06 ` [PATCH v2 0/3] use static_assertion for build errors Stephen Hemminger
2023-11-13 17:06   ` [PATCH v2 1/3] event/opdl: fix non-constant compile time assertion Stephen Hemminger
2023-11-13 17:10     ` Bruce Richardson
2023-11-13 17:54     ` Tyler Retzlaff
2023-11-13 17:06   ` [PATCH v2 2/3] net/sfc: fix non-constant expression inr RTE_BUILD_BUG_ON() Stephen Hemminger
2023-11-13 17:55     ` Tyler Retzlaff
2023-11-13 22:13     ` Stephen Hemminger
2023-11-13 22:28       ` Tyler Retzlaff
2023-11-14  0:00         ` Stephen Hemminger
2023-11-14  0:16         ` Stephen Hemminger
2023-11-14  0:22           ` Stephen Hemminger
2023-11-14  5:50             ` Morten Brørup
2023-11-13 17:06   ` [PATCH v2 3/3] eal: replace out of bounds VLA with static_assert Stephen Hemminger
2023-11-13 17:12     ` Bruce Richardson
2023-11-13 17:57       ` Tyler Retzlaff
2024-02-16  0:33     ` Tyler Retzlaff
2024-02-16  7:48       ` Morten Brørup
2024-02-16  8:02       ` David Marchand
2024-02-16 20:30         ` Tyler Retzlaff
2023-11-13 18:13   ` [PATCH v2 0/3] use static_assertion for build errors Ferruh Yigit
2023-11-13 18:28     ` Morten Brørup
2023-11-13 18:57     ` Tyler Retzlaff
2023-11-17 16:18 ` [PATCH v3 00/10] replace uses of zero length array Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 01/10] member: replace zero length array with flex array Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 02/10] cryptodev: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 03/10] security: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 04/10] pipeline: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 05/10] net/nfp: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 06/10] net/enic: " Stephen Hemminger
2023-11-17 16:18   ` Stephen Hemminger [this message]
2023-11-17 16:18   ` [PATCH v3 08/10] pdcp: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 09/10] net/cpfl: " Stephen Hemminger
2023-11-17 16:18   ` [PATCH v3 10/10] common/dpaxx: remove zero length array Stephen Hemminger
2024-01-16 18:41 ` [PATCH v3 0/5] use static_assert to catch build errors Stephen Hemminger
2024-01-16 18:41   ` [PATCH v3 1/5] event/opdl: fix non-constant compile time assertion Stephen Hemminger
2024-01-17  7:58     ` Andrew Rybchenko
2024-01-17  9:26       ` Bruce Richardson
2024-01-17  9:57         ` Morten Brørup
2024-01-16 18:41   ` [PATCH v3 2/5] net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() Stephen Hemminger
2024-01-17  7:57     ` Andrew Rybchenko
2024-01-16 18:41   ` [PATCH v3 3/5] net/i40e: avoid using const variable in assertion Stephen Hemminger
2024-01-16 18:41   ` [PATCH v3 4/5] mempool: avoid floating point expression in static assertion Stephen Hemminger
2024-01-17  8:06     ` Andrew Rybchenko
2024-01-16 18:41   ` [PATCH v3 5/5] eal: replace out of bounds VLA with static_assert Stephen Hemminger
2024-01-17  7:52     ` Andrew Rybchenko
2024-01-17 17:12       ` Stephen Hemminger
2024-01-17  7:53     ` Mattias Rönnblom
2024-01-17 17:11       ` Stephen Hemminger
2024-01-17 18:19 ` [PATCH v4 0/6] use static assert to cathc build errors Stephen Hemminger
2024-01-17 18:19   ` [PATCH v4 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros Stephen Hemminger
2024-01-18  9:35     ` Konstantin Ananyev
2024-01-18  9:44     ` Andrew Rybchenko
2024-01-19 20:58     ` Tyler Retzlaff
2024-01-19 22:39       ` Stephen Hemminger
2024-01-17 18:19   ` [PATCH v4 2/6] event/opdl: fix non-constant compile time assertion Stephen Hemminger
2024-01-18  9:43     ` Andrew Rybchenko
2024-01-17 18:19   ` [PATCH v4 3/6] net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() Stephen Hemminger
2024-01-18  9:40     ` Andrew Rybchenko
2024-01-17 18:19   ` [PATCH v4 4/6] net/i40e: avoid using const variable in assertion Stephen Hemminger
2024-01-18  8:57     ` Bruce Richardson
2024-01-18  9:34     ` Konstantin Ananyev
2024-01-17 18:19   ` [PATCH v4 5/6] mempool: avoid floating point expression in static assertion Stephen Hemminger
2024-01-17 18:32     ` Morten Brørup
2024-01-18  9:41       ` Andrew Rybchenko
2024-01-18  9:32     ` Konstantin Ananyev
2024-01-17 18:20   ` [PATCH v4 6/6] eal: replace out of bounds VLA with static_assert Stephen Hemminger
2024-01-18 16:50 ` [PATCH v5 0/6] use static_assert for build error reports Stephen Hemminger
2024-01-18 16:50   ` [PATCH v5 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros Stephen Hemminger
2024-01-19  1:30     ` fengchengwen
2024-01-18 16:50   ` [PATCH v5 2/6] event/opdl: fix non-constant compile time assertion Stephen Hemminger
2024-01-18 16:50   ` [PATCH v5 3/6] net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() Stephen Hemminger
2024-01-18 16:50   ` [PATCH v5 4/6] net/i40e: avoid using const variable in assertion Stephen Hemminger
2024-01-18 16:51   ` [PATCH v5 5/6] mempool: avoid floating point expression in static assertion Stephen Hemminger
2024-01-18 18:46     ` Morten Brørup
2024-01-19 10:07     ` Slava Ovsiienko
2024-01-18 16:51   ` [PATCH v5 6/6] eal: replace out of bounds VLA with static_assert Stephen Hemminger
2024-01-18 18:42     ` Morten Brørup
2024-01-19 13:10       ` Ferruh Yigit
2024-02-16  9:14   ` [PATCH v5 0/6] use static_assert for build error reports David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231117162040.241466-8-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).