[PATCH v4 4/6] pipeline: replace zero length array with flex array

Tyler Retzlaff roretzla at linux.microsoft.com
Thu Feb 29 23:58:51 CET 2024


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

Add a temporary suppression for rte_pipeline_table_entry
libabigail bug:

Bugzilla ID: https://sourceware.org/bugzilla/show_bug.cgi?id=31377

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 devtools/libabigail.abignore      | 2 ++
 lib/pipeline/rte_pipeline.h       | 2 +-
 lib/pipeline/rte_port_in_action.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 25c73a5..5292b63 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -33,6 +33,8 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Temporary exceptions till next major ABI version ;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+[suppress_type]
+	name = rte_pipeline_table_entry
 
 [suppress_type]
 	name = rte_rcu_qsbr
diff --git a/lib/pipeline/rte_pipeline.h b/lib/pipeline/rte_pipeline.h
index ec51b9b..0c7994b 100644
--- a/lib/pipeline/rte_pipeline.h
+++ b/lib/pipeline/rte_pipeline.h
@@ -220,7 +220,7 @@ struct rte_pipeline_table_entry {
 		uint32_t table_id;
 	};
 	/** Start of table entry area for user defined actions and meta-data */
-	__extension__ uint8_t action_data[0];
+	uint8_t action_data[];
 };
 
 /**
diff --git a/lib/pipeline/rte_port_in_action.c b/lib/pipeline/rte_port_in_action.c
index 5818973..ebd9b9a 100644
--- a/lib/pipeline/rte_port_in_action.c
+++ b/lib/pipeline/rte_port_in_action.c
@@ -282,7 +282,7 @@ struct rte_port_in_action_profile *
 struct rte_port_in_action {
 	struct ap_config cfg;
 	struct ap_data data;
-	uint8_t memory[0] __rte_cache_aligned;
+	uint8_t memory[] __rte_cache_aligned;
 };
 
 static __rte_always_inline void *
-- 
1.8.3.1



More information about the dev mailing list