From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Yipeng Wang <yipeng1.wang@intel.com>,
mb@smartsharesystems.com, fengchengwen@huawei.com,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v3 6/6] table: replace zero length array with flex array
Date: Tue, 27 Feb 2024 15:56:55 -0800 [thread overview]
Message-ID: <1709078215-20292-7-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1709078215-20292-1-git-send-email-roretzla@linux.microsoft.com>
Zero length arrays are GNU extension. Replace with
standard flex array.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/table/rte_table_acl.c | 2 +-
lib/table/rte_table_array.c | 2 +-
lib/table/rte_table_hash_cuckoo.c | 2 +-
lib/table/rte_table_hash_ext.c | 2 +-
lib/table/rte_table_hash_key16.c | 2 +-
lib/table/rte_table_hash_key32.c | 2 +-
lib/table/rte_table_hash_key8.c | 2 +-
lib/table/rte_table_hash_lru.c | 2 +-
lib/table/rte_table_lpm.c | 2 +-
lib/table/rte_table_lpm_ipv6.c | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lib/table/rte_table_acl.c b/lib/table/rte_table_acl.c
index 83411d2..44d5bb9 100644
--- a/lib/table/rte_table_acl.c
+++ b/lib/table/rte_table_acl.c
@@ -47,7 +47,7 @@ struct rte_table_acl {
uint8_t *acl_rule_memory; /* Memory to store the rules */
/* Memory to store the action table and stack of free entries */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
diff --git a/lib/table/rte_table_array.c b/lib/table/rte_table_array.c
index 80bc2a7..7278282 100644
--- a/lib/table/rte_table_array.c
+++ b/lib/table/rte_table_array.c
@@ -39,7 +39,7 @@ struct rte_table_array {
uint32_t entry_pos_mask;
/* Internal table */
- uint8_t array[0] __rte_cache_aligned;
+ uint8_t array[] __rte_cache_aligned;
} __rte_cache_aligned;
static void *
diff --git a/lib/table/rte_table_hash_cuckoo.c b/lib/table/rte_table_hash_cuckoo.c
index 0f4900c..479dd5e 100644
--- a/lib/table/rte_table_hash_cuckoo.c
+++ b/lib/table/rte_table_hash_cuckoo.c
@@ -42,7 +42,7 @@ struct rte_table_hash {
struct rte_hash *h_table;
/* Lookup table */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c
index 2148d83..601bc95 100644
--- a/lib/table/rte_table_hash_ext.c
+++ b/lib/table/rte_table_hash_ext.c
@@ -99,7 +99,7 @@ struct rte_table_hash {
uint32_t *bkt_ext_stack;
/* Table memory */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_hash_key16.c b/lib/table/rte_table_hash_key16.c
index 7734aef..52834cb 100644
--- a/lib/table/rte_table_hash_key16.c
+++ b/lib/table/rte_table_hash_key16.c
@@ -83,7 +83,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_hash_key32.c b/lib/table/rte_table_hash_key32.c
index fcb4348..f123732 100644
--- a/lib/table/rte_table_hash_key32.c
+++ b/lib/table/rte_table_hash_key32.c
@@ -83,7 +83,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_hash_key8.c b/lib/table/rte_table_hash_key8.c
index bbe6562..f4ed220 100644
--- a/lib/table/rte_table_hash_key8.c
+++ b/lib/table/rte_table_hash_key8.c
@@ -79,7 +79,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c
index cb4f329..2007c16 100644
--- a/lib/table/rte_table_hash_lru.c
+++ b/lib/table/rte_table_hash_lru.c
@@ -76,7 +76,7 @@ struct rte_table_hash {
uint32_t *key_stack;
/* Table memory */
- uint8_t memory[0] __rte_cache_aligned;
+ uint8_t memory[] __rte_cache_aligned;
};
static int
diff --git a/lib/table/rte_table_lpm.c b/lib/table/rte_table_lpm.c
index b9cff25..6773582 100644
--- a/lib/table/rte_table_lpm.c
+++ b/lib/table/rte_table_lpm.c
@@ -47,7 +47,7 @@ struct rte_table_lpm {
/* Next Hop Table (NHT) */
uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS];
- uint8_t nht[0] __rte_cache_aligned;
+ uint8_t nht[] __rte_cache_aligned;
};
static void *
diff --git a/lib/table/rte_table_lpm_ipv6.c b/lib/table/rte_table_lpm_ipv6.c
index e4e823a..8e38557 100644
--- a/lib/table/rte_table_lpm_ipv6.c
+++ b/lib/table/rte_table_lpm_ipv6.c
@@ -44,7 +44,7 @@ struct rte_table_lpm_ipv6 {
/* Next Hop Table (NHT) */
uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS];
- uint8_t nht[0] __rte_cache_aligned;
+ uint8_t nht[] __rte_cache_aligned;
};
static void *
--
1.8.3.1
next prev parent reply other threads:[~2024-02-27 23:57 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff
2024-01-24 22:17 ` [PATCH 1/2] hash: replace zero length array with flex array Tyler Retzlaff
2024-01-24 22:57 ` Honnappa Nagarahalli
2024-01-25 7:16 ` Morten Brørup
2024-01-24 22:17 ` [PATCH 2/2] rcu: " Tyler Retzlaff
2024-01-24 22:57 ` Honnappa Nagarahalli
2024-01-25 7:14 ` Morten Brørup
2024-01-25 12:57 ` [PATCH 0/2] more replacement of zero length array fengchengwen
2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff
2024-02-12 22:36 ` [PATCH v2 1/4] hash: replace zero length array with flex array Tyler Retzlaff
2024-02-12 22:36 ` [PATCH v2 2/4] rcu: " Tyler Retzlaff
2024-02-12 22:36 ` [PATCH v2 3/4] fib: " Tyler Retzlaff
2024-02-12 22:36 ` [PATCH v2 4/4] pipeline: " Tyler Retzlaff
2024-02-12 22:57 ` [PATCH v2 0/4] more replacement of zero length array Stephen Hemminger
2024-02-13 8:31 ` Morten Brørup
2024-02-13 13:14 ` David Marchand
2024-02-13 19:20 ` Tyler Retzlaff
2024-02-14 7:36 ` David Marchand
2024-02-16 10:14 ` David Marchand
2024-02-16 20:46 ` Tyler Retzlaff
2024-02-18 12:31 ` Dodji Seketeli
2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff
2024-02-27 23:56 ` [PATCH v3 1/6] hash: replace zero length array with flex array Tyler Retzlaff
2024-02-27 23:56 ` [PATCH v3 2/6] rcu: " Tyler Retzlaff
2024-02-27 23:56 ` [PATCH v3 3/6] fib: " Tyler Retzlaff
2024-02-27 23:56 ` [PATCH v3 4/6] pipeline: " Tyler Retzlaff
2024-02-27 23:56 ` [PATCH v3 5/6] lpm: " Tyler Retzlaff
2024-02-28 7:26 ` Morten Brørup
2024-02-27 23:56 ` Tyler Retzlaff [this message]
2024-02-28 7:27 ` [PATCH v3 6/6] table: " Morten Brørup
2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff
2024-02-29 22:58 ` [PATCH v4 1/6] hash: replace zero length array with flex array Tyler Retzlaff
2024-02-29 22:58 ` [PATCH v4 2/6] rcu: " Tyler Retzlaff
2024-02-29 22:58 ` [PATCH v4 3/6] fib: " Tyler Retzlaff
2024-02-29 22:58 ` [PATCH v4 4/6] pipeline: " Tyler Retzlaff
2024-02-29 22:58 ` [PATCH v4 5/6] lpm: " Tyler Retzlaff
2024-03-01 8:12 ` Morten Brørup
2024-02-29 22:58 ` [PATCH v4 6/6] table: " Tyler Retzlaff
2024-03-01 8:13 ` Morten Brørup
2024-03-06 19:39 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff
2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff
2024-03-06 20:13 ` [PATCH v5 1/6] hash: replace zero length array with flex array Tyler Retzlaff
2024-03-06 20:52 ` Medvedkin, Vladimir
2024-03-06 20:13 ` [PATCH v5 2/6] rcu: " Tyler Retzlaff
2024-03-06 20:13 ` [PATCH v5 3/6] fib: " Tyler Retzlaff
2024-03-06 20:53 ` Medvedkin, Vladimir
2024-03-06 20:13 ` [PATCH v5 4/6] pipeline: " Tyler Retzlaff
2024-03-06 20:13 ` [PATCH v5 5/6] lpm: " Tyler Retzlaff
2024-03-06 20:53 ` Medvedkin, Vladimir
2024-03-06 20:13 ` [PATCH v5 6/6] table: " Tyler Retzlaff
2024-06-11 15:15 ` [PATCH v5 0/6] more replacement of zero length array 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=1709078215-20292-7-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=mb@smartsharesystems.com \
--cc=sameh.gobriel@intel.com \
--cc=vladimir.medvedkin@intel.com \
--cc=yipeng1.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.