* [PATCH 0/2] more replacement of zero length array @ 2024-01-24 22:17 Tyler Retzlaff 2024-01-24 22:17 ` [PATCH 1/2] hash: replace zero length array with flex array Tyler Retzlaff ` (6 more replies) 0 siblings, 7 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-01-24 22:17 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger, Tyler Retzlaff Replace some missed zero length arrays not captured in the original series. https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* Zero length arrays are a GNU extension that has been superseded by flex arrays. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Tyler Retzlaff (2): hash: replace zero length array with flex array rcu: replace zero length array with flex array lib/hash/rte_thash.c | 4 ++-- lib/rcu/rcu_qsbr_pvt.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 1/2] hash: replace zero length array with flex array 2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff @ 2024-01-24 22:17 ` 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 ` (5 subsequent siblings) 6 siblings, 2 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-01-24 22:17 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index e8de071..1982051 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -80,7 +80,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ uint32_t compl_table[0] __rte_cache_aligned; + uint32_t compl_table[] __rte_cache_aligned; /** < Complementary table */ }; @@ -93,7 +93,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH 1/2] hash: replace zero length array with flex array 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 1 sibling, 0 replies; 51+ messages in thread From: Honnappa Nagarahalli @ 2024-01-24 22:57 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger, nd, nd > -----Original Message----- > From: Tyler Retzlaff <roretzla@linux.microsoft.com> > Sent: Wednesday, January 24, 2024 4:18 PM > To: dev@dpdk.org > Cc: Bruce Richardson <bruce.richardson@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>; > Stephen Hemminger <stephen@networkplumber.org>; Tyler Retzlaff > <roretzla@linux.microsoft.com> > Subject: [PATCH 1/2] hash: replace zero length array with flex array > > Zero length arrays are GNU extension. Replace with standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> > --- > lib/hash/rte_thash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index e8de071..1982051 > 100644 > --- a/lib/hash/rte_thash.c > +++ b/lib/hash/rte_thash.c > @@ -80,7 +80,7 @@ struct rte_thash_subtuple_helper { > uint32_t tuple_offset; /** < Offset in bits of the subtuple */ > uint32_t tuple_len; /** < Length in bits of the subtuple */ > uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ > - __extension__ uint32_t compl_table[0] __rte_cache_aligned; > + uint32_t compl_table[] __rte_cache_aligned; > /** < Complementary table */ > }; > > @@ -93,7 +93,7 @@ struct rte_thash_ctx { > uint32_t flags; > uint64_t *matrices; > /**< matrices used with rte_thash_gfni implementation */ > - uint8_t hash_key[0]; > + uint8_t hash_key[]; > }; > > int > -- > 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH 1/2] hash: replace zero length array with flex array 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 1 sibling, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-01-25 7:16 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 24 January 2024 23.18 flex array > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 2/2] rcu: replace zero length array with flex array 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:17 ` 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 ` (4 subsequent siblings) 6 siblings, 2 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-01-24 22:17 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/rcu/rcu_qsbr_pvt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH 2/2] rcu: replace zero length array with flex array 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 1 sibling, 0 replies; 51+ messages in thread From: Honnappa Nagarahalli @ 2024-01-24 22:57 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger, nd, nd > -----Original Message----- > From: Tyler Retzlaff <roretzla@linux.microsoft.com> > Sent: Wednesday, January 24, 2024 4:18 PM > To: dev@dpdk.org > Cc: Bruce Richardson <bruce.richardson@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>; > Stephen Hemminger <stephen@networkplumber.org>; Tyler Retzlaff > <roretzla@linux.microsoft.com> > Subject: [PATCH 2/2] rcu: replace zero length array with flex array > > Zero length arrays are GNU extension. Replace with standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> > --- > lib/rcu/rcu_qsbr_pvt.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index > 5fd7ca2..96d05e6 100644 > --- a/lib/rcu/rcu_qsbr_pvt.h > +++ b/lib/rcu/rcu_qsbr_pvt.h > @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { > */ > typedef struct { > uint64_t token; /**< Token */ > - uint8_t elem[0]; /**< Pointer to user element */ > + uint8_t elem[]; /**< Pointer to user element */ > } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; > > #endif /* _RTE_RCU_QSBR_PVT_H_ */ > -- > 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH 2/2] rcu: replace zero length array with flex array 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 1 sibling, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-01-25 7:14 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 24 January 2024 23.18 lex array > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH 0/2] more replacement of zero length array 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:17 ` [PATCH 2/2] rcu: " Tyler Retzlaff @ 2024-01-25 12:57 ` fengchengwen 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff ` (3 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: fengchengwen @ 2024-01-25 12:57 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, Stephen Hemminger Series-acked-by: Chengwen Feng <fengchengwen@huawei.com> On 2024/1/25 6:17, Tyler Retzlaff wrote: > Replace some missed zero length arrays not captured in the > original series. > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > Zero length arrays are a GNU extension that has been > superseded by flex arrays. > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > Tyler Retzlaff (2): > hash: replace zero length array with flex array > rcu: replace zero length array with flex array > > lib/hash/rte_thash.c | 4 ++-- > lib/rcu/rcu_qsbr_pvt.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v2 0/4] more replacement of zero length array 2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff ` (2 preceding siblings ...) 2024-01-25 12:57 ` [PATCH 0/2] more replacement of zero length array fengchengwen @ 2024-02-12 22:36 ` Tyler Retzlaff 2024-02-12 22:36 ` [PATCH v2 1/4] hash: replace zero length array with flex array Tyler Retzlaff ` (5 more replies) 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff ` (2 subsequent siblings) 6 siblings, 6 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-12 22:36 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Replace some missed zero length arrays not captured in the original series. https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* Zero length arrays are a GNU extension that has been superseded by flex arrays. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html v2: * added additional patches for fib & pipeline libs. series-acks have been placed only against original hash and rcu patches. Tyler Retzlaff (4): hash: replace zero length array with flex array rcu: replace zero length array with flex array fib: replace zero length array with flex array pipeline: replace zero length array with flex array lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- lib/hash/rte_thash.c | 4 ++-- lib/pipeline/rte_pipeline.h | 2 +- lib/rcu/rcu_qsbr_pvt.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v2 1/4] hash: replace zero length array with flex array 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff @ 2024-02-12 22:36 ` Tyler Retzlaff 2024-02-12 22:36 ` [PATCH v2 2/4] rcu: " Tyler Retzlaff ` (4 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-12 22:36 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index e8de071..1982051 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -80,7 +80,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ uint32_t compl_table[0] __rte_cache_aligned; + uint32_t compl_table[] __rte_cache_aligned; /** < Complementary table */ }; @@ -93,7 +93,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v2 2/4] rcu: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-12 22:36 ` [PATCH v2 3/4] fib: " Tyler Retzlaff ` (3 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-12 22:36 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> --- lib/rcu/rcu_qsbr_pvt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v2 3/4] fib: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-12 22:36 ` [PATCH v2 4/4] pipeline: " Tyler Retzlaff ` (2 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-12 22:36 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index b0d1a40..5a7b6dd 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -32,7 +32,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 3cf161a..71ed191 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -36,7 +36,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline uint32_t -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v2 4/4] pipeline: replace zero length array with flex array 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff ` (2 preceding siblings ...) 2024-02-12 22:36 ` [PATCH v2 3/4] fib: " Tyler Retzlaff @ 2024-02-12 22:36 ` Tyler Retzlaff 2024-02-12 22:57 ` [PATCH v2 0/4] more replacement of zero length array Stephen Hemminger 2024-02-13 13:14 ` David Marchand 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-12 22:36 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/pipeline/rte_pipeline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[]; }; /** -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff ` (3 preceding siblings ...) 2024-02-12 22:36 ` [PATCH v2 4/4] pipeline: " Tyler Retzlaff @ 2024-02-12 22:57 ` Stephen Hemminger 2024-02-13 8:31 ` Morten Brørup 2024-02-13 13:14 ` David Marchand 5 siblings, 1 reply; 51+ messages in thread From: Stephen Hemminger @ 2024-02-12 22:57 UTC (permalink / raw) To: Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen On Mon, 12 Feb 2024 14:36:02 -0800 Tyler Retzlaff <roretzla@linux.microsoft.com> wrote: > Replace some missed zero length arrays not captured in the > original series. > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > Zero length arrays are a GNU extension that has been > superseded by flex arrays. > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > v2: > * added additional patches for fib & pipeline libs. > series-acks have been placed only against original > hash and rcu patches. > > Tyler Retzlaff (4): > hash: replace zero length array with flex array > rcu: replace zero length array with flex array > fib: replace zero length array with flex array > pipeline: replace zero length array with flex array > > lib/fib/dir24_8.h | 2 +- > lib/fib/trie.h | 2 +- > lib/hash/rte_thash.c | 4 ++-- > lib/pipeline/rte_pipeline.h | 2 +- > lib/rcu/rcu_qsbr_pvt.h | 2 +- > 5 files changed, 6 insertions(+), 6 deletions(-) > Series-acked-by: Stephen Hemminger <stephen@networkplumber.org> ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v2 0/4] more replacement of zero length array 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 0 siblings, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-02-13 8:31 UTC (permalink / raw) To: Stephen Hemminger, Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, fengchengwen > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Monday, 12 February 2024 23.57 > > On Mon, 12 Feb 2024 14:36:02 -0800 > Tyler Retzlaff <roretzla@linux.microsoft.com> wrote: > > > Replace some missed zero length arrays not captured in the > > original series. > > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > > > Zero length arrays are a GNU extension that has been > > superseded by flex arrays. > > > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > > > v2: > > * added additional patches for fib & pipeline libs. > > series-acks have been placed only against original > > hash and rcu patches. > > > > Tyler Retzlaff (4): > > hash: replace zero length array with flex array > > rcu: replace zero length array with flex array > > fib: replace zero length array with flex array > > pipeline: replace zero length array with flex array > > > > lib/fib/dir24_8.h | 2 +- > > lib/fib/trie.h | 2 +- > > lib/hash/rte_thash.c | 4 ++-- > > lib/pipeline/rte_pipeline.h | 2 +- > > lib/rcu/rcu_qsbr_pvt.h | 2 +- > > 5 files changed, 6 insertions(+), 6 deletions(-) > > > > Series-acked-by: Stephen Hemminger <stephen@networkplumber.org> Series-reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff ` (4 preceding siblings ...) 2024-02-12 22:57 ` [PATCH v2 0/4] more replacement of zero length array Stephen Hemminger @ 2024-02-13 13:14 ` David Marchand 2024-02-13 19:20 ` Tyler Retzlaff 5 siblings, 1 reply; 51+ messages in thread From: David Marchand @ 2024-02-13 13:14 UTC (permalink / raw) To: Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Dodji Seketeli On Mon, Feb 12, 2024 at 11:36 PM Tyler Retzlaff <roretzla@linux.microsoft.com> wrote: > > Replace some missed zero length arrays not captured in the > original series. > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > Zero length arrays are a GNU extension that has been > superseded by flex arrays. > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > v2: > * added additional patches for fib & pipeline libs. > series-acks have been placed only against original > hash and rcu patches. There seems to be an issue with the ABI check on those changes. After a quick chat with Dodji, I opened a bug for libabigail. https://sourceware.org/bugzilla/show_bug.cgi?id=31377 -- David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-13 13:14 ` David Marchand @ 2024-02-13 19:20 ` Tyler Retzlaff 2024-02-14 7:36 ` David Marchand 0 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-13 19:20 UTC (permalink / raw) To: David Marchand Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Dodji Seketeli On Tue, Feb 13, 2024 at 02:14:28PM +0100, David Marchand wrote: > On Mon, Feb 12, 2024 at 11:36 PM Tyler Retzlaff > <roretzla@linux.microsoft.com> wrote: > > > > Replace some missed zero length arrays not captured in the > > original series. > > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > > > Zero length arrays are a GNU extension that has been > > superseded by flex arrays. > > > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > > > v2: > > * added additional patches for fib & pipeline libs. > > series-acks have been placed only against original > > hash and rcu patches. > > There seems to be an issue with the ABI check on those changes. > After a quick chat with Dodji, I opened a bug for libabigail. > > https://sourceware.org/bugzilla/show_bug.cgi?id=31377 I double checked again and I don't see the struct in question being embedded as a field of another struct/union. So I don't think there should be an ABI change here. I'm okay with the change being merged but if there is concern I can drop this patch from the series. > > > -- > David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-13 19:20 ` Tyler Retzlaff @ 2024-02-14 7:36 ` David Marchand 2024-02-16 10:14 ` David Marchand 0 siblings, 1 reply; 51+ messages in thread From: David Marchand @ 2024-02-14 7:36 UTC (permalink / raw) To: Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Dodji Seketeli On Tue, Feb 13, 2024 at 8:20 PM Tyler Retzlaff <roretzla@linux.microsoft.com> wrote: > > On Tue, Feb 13, 2024 at 02:14:28PM +0100, David Marchand wrote: > > On Mon, Feb 12, 2024 at 11:36 PM Tyler Retzlaff > > <roretzla@linux.microsoft.com> wrote: > > > > > > Replace some missed zero length arrays not captured in the > > > original series. > > > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > > > > > Zero length arrays are a GNU extension that has been > > > superseded by flex arrays. > > > > > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > > > > > v2: > > > * added additional patches for fib & pipeline libs. > > > series-acks have been placed only against original > > > hash and rcu patches. > > > > There seems to be an issue with the ABI check on those changes. > > After a quick chat with Dodji, I opened a bug for libabigail. > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=31377 > > I double checked again and I don't see the struct in question being > embedded as a field of another struct/union. So I don't think there should > be an ABI change here. That was and is still my understanding too. The message we get when testing this series is: type size hasn't changed 1 data member change: 'uint8_t action_data[]' has *some* difference - please report as a bug which is why I reached out to Dodji (libabigail maintainer). Dodji explained me that zero length / flex arrays conversion is something he has been working on, and there are still some rough edges. This message is there so that libabigail community gets more input on real life cases to handle. > > I'm okay with the change being merged but if there is concern I can drop > this patch from the series. At least, we can't merge it in the current form. If libabigail gets a fix quickly, DPDK CI will still need a released version. So for this patch to be merged now, we need a libabigail suppression rule. I don't see a way to precisely waive this issue, so my suggestion is to silence any change on the concerned structure here (which should be ok, as the pipeline library data struct have been super stable for a couple of years). Something like: $ git diff diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 21b8cd6113..d667157909 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -33,3 +33,5 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[suppress_type] + name = rte_pipeline_table_entry -- David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 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 0 siblings, 2 replies; 51+ messages in thread From: David Marchand @ 2024-02-16 10:14 UTC (permalink / raw) To: Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Dodji Seketeli On Wed, Feb 14, 2024 at 8:36 AM David Marchand <david.marchand@redhat.com> wrote: > > I'm okay with the change being merged but if there is concern I can drop > > this patch from the series. > > At least, we can't merge it in the current form. > > If libabigail gets a fix quickly, DPDK CI will still need a released version. > So for this patch to be merged now, we need a libabigail suppression rule. > I don't see a way to precisely waive this issue, so my suggestion is > to silence any change on the concerned structure here (which should be > ok, as the pipeline library data struct have been super stable for a > couple of years). > Something like: > > $ git diff > diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore > index 21b8cd6113..d667157909 100644 > --- a/devtools/libabigail.abignore > +++ b/devtools/libabigail.abignore > @@ -33,3 +33,5 @@ > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ; Temporary exceptions till next major ABI version ; > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > +[suppress_type] > + name = rte_pipeline_table_entry Dodji confirmed the issue in libabigail and prepared a fix. DPDK still needs a suppression rule (like the one proposed above) if we want to merge this change before the libabigail fix makes it to all distribs. Please resubmit this series with my proposal and a comment pointing at libabigail bz squashed in patch 4. -- David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-16 10:14 ` David Marchand @ 2024-02-16 20:46 ` Tyler Retzlaff 2024-02-18 12:31 ` Dodji Seketeli 1 sibling, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-16 20:46 UTC (permalink / raw) To: David Marchand Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Dodji Seketeli On Fri, Feb 16, 2024 at 11:14:27AM +0100, David Marchand wrote: > On Wed, Feb 14, 2024 at 8:36 AM David Marchand > <david.marchand@redhat.com> wrote: > > > I'm okay with the change being merged but if there is concern I can drop > > > this patch from the series. > > > > At least, we can't merge it in the current form. > > > > If libabigail gets a fix quickly, DPDK CI will still need a released version. > > So for this patch to be merged now, we need a libabigail suppression rule. > > I don't see a way to precisely waive this issue, so my suggestion is > > to silence any change on the concerned structure here (which should be > > ok, as the pipeline library data struct have been super stable for a > > couple of years). > > Something like: > > > > $ git diff > > diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore > > index 21b8cd6113..d667157909 100644 > > --- a/devtools/libabigail.abignore > > +++ b/devtools/libabigail.abignore > > @@ -33,3 +33,5 @@ > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > ; Temporary exceptions till next major ABI version ; > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > +[suppress_type] > > + name = rte_pipeline_table_entry > > Dodji confirmed the issue in libabigail and prepared a fix. > > DPDK still needs a suppression rule (like the one proposed above) if > we want to merge this change before the libabigail fix makes it to all > distribs. > Please resubmit this series with my proposal and a comment pointing at > libabigail bz squashed in patch 4. this works out conveniently, i noticed there are a few more instances that i'll try to add to this series so i'll come back with a new rev. i've marked the series changes requested in patchwork for now. > > > -- > David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v2 0/4] more replacement of zero length array 2024-02-16 10:14 ` David Marchand 2024-02-16 20:46 ` Tyler Retzlaff @ 2024-02-18 12:31 ` Dodji Seketeli 1 sibling, 0 replies; 51+ messages in thread From: Dodji Seketeli @ 2024-02-18 12:31 UTC (permalink / raw) To: David Marchand Cc: Tyler Retzlaff, dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen Hello, David Marchand <david.marchand@redhat.com> writes: > Dodji confirmed the issue in libabigail and prepared a fix. Yes, that is correct. Sorry for the inconvenience. The patch fixing this issue in libabigail has been applied to the mainline and is https://sourceware.org/git/?p=libabigail.git;a=commit;h=3cc1c3423c89c2cfd9d451ab99b71f3a74b35127. > DPDK still needs a suppression rule (like the one proposed above) if > we want to merge this change before the libabigail fix makes it to all > distribs. We can discuss further if you need a "quick" 2.4.1 release as a vehicle to consume the fix or if you can wait for a 2.5 one that might come later. I agree however that in the mean time, a temporary suppression specification might be warranted. [...] Cheers, -- Dodji ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 0/6] more replacement of zero length array 2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff ` (3 preceding siblings ...) 2024-02-12 22:36 ` [PATCH v2 0/4] " Tyler Retzlaff @ 2024-02-27 23:56 ` Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 1/6] hash: replace zero length array with flex array Tyler Retzlaff ` (5 more replies) 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff 6 siblings, 6 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Replace some missed zero length arrays not captured in the original series. https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* Zero length arrays are a GNU extension that has been superseded by flex arrays. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html v3: * add temporary suppression of libabigail bug https://sourceware.org/bugzilla/show_bug.cgi?id=31377 * add 2 more patches covering lpm and table (series ack has not been extended) * add another zero length array missed in rcu and pipeline v2: * added additional patches for fib & pipeline libs. series-acks have been placed only against original hash and rcu patches. Tyler Retzlaff (6): hash: replace zero length array with flex array rcu: replace zero length array with flex array fib: replace zero length array with flex array pipeline: replace zero length array with flex array lpm: replace zero length array with flex array table: replace zero length array with flex array devtools/libabigail.abignore | 2 ++ lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- lib/hash/rte_thash.c | 4 ++-- lib/lpm/rte_lpm6.c | 2 +- lib/pipeline/rte_pipeline.h | 2 +- lib/pipeline/rte_port_in_action.c | 2 +- lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 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 +- 19 files changed, 21 insertions(+), 19 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 1/6] hash: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff @ 2024-02-27 23:56 ` Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 2/6] rcu: " Tyler Retzlaff ` (4 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index e8de071..1982051 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -80,7 +80,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ uint32_t compl_table[0] __rte_cache_aligned; + uint32_t compl_table[] __rte_cache_aligned; /** < Complementary table */ }; @@ -93,7 +93,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 2/6] rcu: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 3/6] fib: " Tyler Retzlaff ` (3 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index e7ef788..af9cbea 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -106,7 +106,7 @@ struct rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - struct rte_rcu_qsbr_cnt qsbr_cnt[0] __rte_cache_aligned; + struct rte_rcu_qsbr_cnt qsbr_cnt[] __rte_cache_aligned; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array, -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 3/6] fib: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 4/6] pipeline: " Tyler Retzlaff ` (2 subsequent siblings) 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index b0d1a40..5a7b6dd 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -32,7 +32,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 3cf161a..71ed191 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -36,7 +36,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline uint32_t -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 4/6] pipeline: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff ` (2 preceding siblings ...) 2024-02-27 23:56 ` [PATCH v3 3/6] fib: " Tyler Retzlaff @ 2024-02-27 23:56 ` Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 5/6] lpm: " Tyler Retzlaff 2024-02-27 23:56 ` [PATCH v3 6/6] table: " Tyler Retzlaff 5 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@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 645d289..2a23d53 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_eth_fp_ops 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 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 5/6] lpm: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff ` (3 preceding siblings ...) 2024-02-27 23:56 ` [PATCH v3 4/6] pipeline: " Tyler Retzlaff @ 2024-02-27 23:56 ` Tyler Retzlaff 2024-02-28 7:26 ` Morten Brørup 2024-02-27 23:56 ` [PATCH v3 6/6] table: " Tyler Retzlaff 5 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/lpm/rte_lpm6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 271bc48..08fef82 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -106,7 +106,7 @@ struct rte_lpm6 { struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ - struct rte_lpm6_tbl_entry tbl8[0] + struct rte_lpm6_tbl_entry tbl8[] __rte_cache_aligned; /**< LPM tbl8 table. */ }; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v3 5/6] lpm: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 5/6] lpm: " Tyler Retzlaff @ 2024-02-28 7:26 ` Morten Brørup 0 siblings, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-02-28 7:26 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, fengchengwen > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 28 February 2024 00.57 > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v3 6/6] table: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff ` (4 preceding siblings ...) 2024-02-27 23:56 ` [PATCH v3 5/6] lpm: " Tyler Retzlaff @ 2024-02-27 23:56 ` Tyler Retzlaff 2024-02-28 7:27 ` Morten Brørup 5 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-27 23:56 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v3 6/6] table: replace zero length array with flex array 2024-02-27 23:56 ` [PATCH v3 6/6] table: " Tyler Retzlaff @ 2024-02-28 7:27 ` Morten Brørup 0 siblings, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-02-28 7:27 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, fengchengwen > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 28 February 2024 00.57 > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 0/6] more replacement of zero length array 2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff ` (4 preceding siblings ...) 2024-02-27 23:56 ` [PATCH v3 0/6] " Tyler Retzlaff @ 2024-02-29 22:58 ` Tyler Retzlaff 2024-02-29 22:58 ` [PATCH v4 1/6] hash: replace zero length array with flex array Tyler Retzlaff ` (6 more replies) 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff 6 siblings, 7 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Replace some missed zero length arrays not captured in the original series. https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* Zero length arrays are a GNU extension that has been superseded by flex arrays. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html v4: * add another temporary suppression of libabigail bug for rte_rcu_qsbr. As with pipeline i cannot see that rte_rcu_qsbr is nested in any other struct. v3: * add temporary suppression of libabigail bug https://sourceware.org/bugzilla/show_bug.cgi?id=31377 * add 2 more patches covering lpm and table (series ack has not been extended) * add another zero length array missed in rcu and pipeline v2: * added additional patches for fib & pipeline libs. series-acks have been placed only against original hash and rcu patches. Tyler Retzlaff (6): hash: replace zero length array with flex array rcu: replace zero length array with flex array fib: replace zero length array with flex array pipeline: replace zero length array with flex array lpm: replace zero length array with flex array table: replace zero length array with flex array devtools/libabigail.abignore | 5 +++++ lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- lib/hash/rte_thash.c | 4 ++-- lib/lpm/rte_lpm6.c | 2 +- lib/pipeline/rte_pipeline.h | 2 +- lib/pipeline/rte_port_in_action.c | 2 +- lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 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 +- 19 files changed, 24 insertions(+), 19 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 1/6] hash: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff @ 2024-02-29 22:58 ` Tyler Retzlaff 2024-02-29 22:58 ` [PATCH v4 2/6] rcu: " Tyler Retzlaff ` (5 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index e8de071..1982051 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -80,7 +80,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ uint32_t compl_table[0] __rte_cache_aligned; + uint32_t compl_table[] __rte_cache_aligned; /** < Complementary table */ }; @@ -93,7 +93,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 2/6] rcu: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-29 22:58 ` [PATCH v4 3/6] fib: " Tyler Retzlaff ` (4 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- devtools/libabigail.abignore | 3 +++ lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 645d289..25c73a5 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -35,5 +35,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [suppress_type] + name = rte_rcu_qsbr + +[suppress_type] name = rte_eth_fp_ops has_data_member_inserted_between = {offset_of(reserved2), end} diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index e7ef788..af9cbea 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -106,7 +106,7 @@ struct rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - struct rte_rcu_qsbr_cnt qsbr_cnt[0] __rte_cache_aligned; + struct rte_rcu_qsbr_cnt qsbr_cnt[] __rte_cache_aligned; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array, -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 3/6] fib: replace zero length array with flex array 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 ` Tyler Retzlaff 2024-02-29 22:58 ` [PATCH v4 4/6] pipeline: " Tyler Retzlaff ` (3 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index b0d1a40..5a7b6dd 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -32,7 +32,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 3cf161a..71ed191 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -36,7 +36,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline uint32_t -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 4/6] pipeline: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff ` (2 preceding siblings ...) 2024-02-29 22:58 ` [PATCH v4 3/6] fib: " Tyler Retzlaff @ 2024-02-29 22:58 ` Tyler Retzlaff 2024-02-29 22:58 ` [PATCH v4 5/6] lpm: " Tyler Retzlaff ` (2 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@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 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 5/6] lpm: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff ` (3 preceding siblings ...) 2024-02-29 22:58 ` [PATCH v4 4/6] pipeline: " Tyler Retzlaff @ 2024-02-29 22:58 ` Tyler Retzlaff 2024-03-01 8:12 ` Morten Brørup 2024-02-29 22:58 ` [PATCH v4 6/6] table: " Tyler Retzlaff 2024-03-06 19:39 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff 6 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/lpm/rte_lpm6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 271bc48..08fef82 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -106,7 +106,7 @@ struct rte_lpm6 { struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ - struct rte_lpm6_tbl_entry tbl8[0] + struct rte_lpm6_tbl_entry tbl8[] __rte_cache_aligned; /**< LPM tbl8 table. */ }; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v4 5/6] lpm: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 5/6] lpm: " Tyler Retzlaff @ 2024-03-01 8:12 ` Morten Brørup 0 siblings, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-03-01 8:12 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, fengchengwen > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Thursday, 29 February 2024 23.59 > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 6/6] table: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff ` (4 preceding siblings ...) 2024-02-29 22:58 ` [PATCH v4 5/6] lpm: " Tyler Retzlaff @ 2024-02-29 22:58 ` 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 6 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-02-29 22:58 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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 ^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v4 6/6] table: replace zero length array with flex array 2024-02-29 22:58 ` [PATCH v4 6/6] table: " Tyler Retzlaff @ 2024-03-01 8:13 ` Morten Brørup 0 siblings, 0 replies; 51+ messages in thread From: Morten Brørup @ 2024-03-01 8:13 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, fengchengwen > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Thursday, 29 February 2024 23.59 > > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > --- Reviewed-by: Morten Brørup <mb@smartsharesystems.com> ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v4 0/6] more replacement of zero length array 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff ` (5 preceding siblings ...) 2024-02-29 22:58 ` [PATCH v4 6/6] table: " Tyler Retzlaff @ 2024-03-06 19:39 ` Tyler Retzlaff 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 19:39 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen ping Is this one worth closing out as a part of rc2 so it is done? not sure if it's a priority to have lib ~complete. On Thu, Feb 29, 2024 at 02:58:47PM -0800, Tyler Retzlaff wrote: > Replace some missed zero length arrays not captured in the > original series. > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > Zero length arrays are a GNU extension that has been > superseded by flex arrays. > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > v4: > * add another temporary suppression of libabigail bug > for rte_rcu_qsbr. As with pipeline i cannot see that > rte_rcu_qsbr is nested in any other struct. > > v3: > * add temporary suppression of libabigail bug > https://sourceware.org/bugzilla/show_bug.cgi?id=31377 > * add 2 more patches covering lpm and table > (series ack has not been extended) > * add another zero length array missed in rcu and pipeline > > v2: > * added additional patches for fib & pipeline libs. > series-acks have been placed only against original > hash and rcu patches. > > Tyler Retzlaff (6): > hash: replace zero length array with flex array > rcu: replace zero length array with flex array > fib: replace zero length array with flex array > pipeline: replace zero length array with flex array > lpm: replace zero length array with flex array > table: replace zero length array with flex array > > devtools/libabigail.abignore | 5 +++++ > lib/fib/dir24_8.h | 2 +- > lib/fib/trie.h | 2 +- > lib/hash/rte_thash.c | 4 ++-- > lib/lpm/rte_lpm6.c | 2 +- > lib/pipeline/rte_pipeline.h | 2 +- > lib/pipeline/rte_port_in_action.c | 2 +- > lib/rcu/rcu_qsbr_pvt.h | 2 +- > lib/rcu/rte_rcu_qsbr.h | 2 +- > 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 +- > 19 files changed, 24 insertions(+), 19 deletions(-) > > -- > 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 0/6] more replacement of zero length array 2024-01-24 22:17 [PATCH 0/2] more replacement of zero length array Tyler Retzlaff ` (5 preceding siblings ...) 2024-02-29 22:58 ` [PATCH v4 0/6] more replacement of zero length array Tyler Retzlaff @ 2024-03-06 20:13 ` Tyler Retzlaff 2024-03-06 20:13 ` [PATCH v5 1/6] hash: replace zero length array with flex array Tyler Retzlaff ` (6 more replies) 6 siblings, 7 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Replace some missed zero length arrays not captured in the original series. https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* Zero length arrays are a GNU extension that has been superseded by flex arrays. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html v5: * no changes, rebase for upstream merge / conflicts. v4: * add another temporary suppression of libabigail bug for rte_rcu_qsbr. As with pipeline i cannot see that rte_rcu_qsbr is nested in any other struct. v3: * add temporary suppression of libabigail bug https://sourceware.org/bugzilla/show_bug.cgi?id=31377 * add 2 more patches covering lpm and table (series ack has not been extended) * add another zero length array missed in rcu and pipeline v2: * added additional patches for fib & pipeline libs. series-acks have been placed only against original hash and rcu patches. Tyler Retzlaff (6): hash: replace zero length array with flex array rcu: replace zero length array with flex array fib: replace zero length array with flex array pipeline: replace zero length array with flex array lpm: replace zero length array with flex array table: replace zero length array with flex array devtools/libabigail.abignore | 5 +++++ lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- lib/hash/rte_thash.c | 4 ++-- lib/lpm/rte_lpm6.c | 2 +- lib/pipeline/rte_pipeline.h | 2 +- lib/pipeline/rte_port_in_action.c | 2 +- lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 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 +- 19 files changed, 24 insertions(+), 19 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 1/6] hash: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff @ 2024-03-06 20:13 ` Tyler Retzlaff 2024-03-06 20:52 ` Medvedkin, Vladimir 2024-03-06 20:13 ` [PATCH v5 2/6] rcu: " Tyler Retzlaff ` (5 subsequent siblings) 6 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/hash/rte_thash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index 68f653f..10721ef 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -81,7 +81,7 @@ struct rte_thash_subtuple_helper { uint32_t tuple_offset; /** < Offset in bits of the subtuple */ uint32_t tuple_len; /** < Length in bits of the subtuple */ uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[0]; + alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[]; /** < Complementary table */ }; @@ -94,7 +94,7 @@ struct rte_thash_ctx { uint32_t flags; uint64_t *matrices; /**< matrices used with rte_thash_gfni implementation */ - uint8_t hash_key[0]; + uint8_t hash_key[]; }; int -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v5 1/6] hash: replace zero length array with flex array 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 0 siblings, 0 replies; 51+ messages in thread From: Medvedkin, Vladimir @ 2024-03-06 20:52 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Yipeng Wang, mb, fengchengwen Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> On 06/03/2024 20:13, Tyler Retzlaff wrote: > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> > Reviewed-by: Morten Brørup <mb@smartsharesystems.com> > Acked-by: Chengwen Feng <fengchengwen@huawei.com> > Acked-by: Stephen Hemminger <stephen@networkplumber.org> > --- > lib/hash/rte_thash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c > index 68f653f..10721ef 100644 > --- a/lib/hash/rte_thash.c > +++ b/lib/hash/rte_thash.c > @@ -81,7 +81,7 @@ struct rte_thash_subtuple_helper { > uint32_t tuple_offset; /** < Offset in bits of the subtuple */ > uint32_t tuple_len; /** < Length in bits of the subtuple */ > uint32_t lsb_msk; /** < (1 << reta_sz_log) - 1 */ > - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[0]; > + alignas(RTE_CACHE_LINE_SIZE) uint32_t compl_table[]; > /** < Complementary table */ > }; > > @@ -94,7 +94,7 @@ struct rte_thash_ctx { > uint32_t flags; > uint64_t *matrices; > /**< matrices used with rte_thash_gfni implementation */ > - uint8_t hash_key[0]; > + uint8_t hash_key[]; > }; > > int -- Regards, Vladimir ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 2/6] rcu: replace zero length array with flex array 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:13 ` Tyler Retzlaff 2024-03-06 20:13 ` [PATCH v5 3/6] fib: " Tyler Retzlaff ` (4 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- devtools/libabigail.abignore | 3 +++ lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 645d289..25c73a5 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -35,5 +35,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [suppress_type] + name = rte_rcu_qsbr + +[suppress_type] name = rte_eth_fp_ops has_data_member_inserted_between = {offset_of(reserved2), end} diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index 0506191..ed3dd6d 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -107,7 +107,7 @@ struct __rte_cache_aligned rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - alignas(RTE_CACHE_LINE_SIZE) struct rte_rcu_qsbr_cnt qsbr_cnt[0]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_rcu_qsbr_cnt qsbr_cnt[]; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array, -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 3/6] fib: replace zero length array with flex array 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:13 ` [PATCH v5 2/6] rcu: " Tyler Retzlaff @ 2024-03-06 20:13 ` Tyler Retzlaff 2024-03-06 20:53 ` Medvedkin, Vladimir 2024-03-06 20:13 ` [PATCH v5 4/6] pipeline: " Tyler Retzlaff ` (3 subsequent siblings) 6 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index 6d350f7..7125049 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -34,7 +34,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 36ce1fd..2c20184 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -38,7 +38,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; }; static inline uint32_t -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v5 3/6] fib: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 3/6] fib: " Tyler Retzlaff @ 2024-03-06 20:53 ` Medvedkin, Vladimir 0 siblings, 0 replies; 51+ messages in thread From: Medvedkin, Vladimir @ 2024-03-06 20:53 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Yipeng Wang, mb, fengchengwen Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> On 06/03/2024 20:13, Tyler Retzlaff wrote: > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > Reviewed-by: Morten Brørup <mb@smartsharesystems.com> > Acked-by: Stephen Hemminger <stephen@networkplumber.org> > --- > lib/fib/dir24_8.h | 2 +- > lib/fib/trie.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h > index 6d350f7..7125049 100644 > --- a/lib/fib/dir24_8.h > +++ b/lib/fib/dir24_8.h > @@ -34,7 +34,7 @@ struct dir24_8_tbl { > uint64_t *tbl8; /**< tbl8 table. */ > uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ > /* tbl24 table. */ > - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; > + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; > }; > > static inline void * > diff --git a/lib/fib/trie.h b/lib/fib/trie.h > index 36ce1fd..2c20184 100644 > --- a/lib/fib/trie.h > +++ b/lib/fib/trie.h > @@ -38,7 +38,7 @@ struct rte_trie_tbl { > uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ > uint32_t tbl8_pool_pos; > /* tbl24 table. */ > - __extension__ alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[0]; > + alignas(RTE_CACHE_LINE_SIZE) uint64_t tbl24[]; > }; > > static inline uint32_t -- Regards, Vladimir ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 4/6] pipeline: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff ` (2 preceding siblings ...) 2024-03-06 20:13 ` [PATCH v5 3/6] fib: " Tyler Retzlaff @ 2024-03-06 20:13 ` Tyler Retzlaff 2024-03-06 20:13 ` [PATCH v5 5/6] lpm: " Tyler Retzlaff ` (2 subsequent siblings) 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff 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@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@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 bbacaff..4127bd2 100644 --- a/lib/pipeline/rte_port_in_action.c +++ b/lib/pipeline/rte_port_in_action.c @@ -283,7 +283,7 @@ struct rte_port_in_action_profile * struct rte_port_in_action { struct ap_config cfg; struct ap_data data; - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static __rte_always_inline void * -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 5/6] lpm: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff ` (3 preceding siblings ...) 2024-03-06 20:13 ` [PATCH v5 4/6] pipeline: " Tyler Retzlaff @ 2024-03-06 20:13 ` 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 6 siblings, 1 reply; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> --- lib/lpm/rte_lpm6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 46d8f71..5cc1bb2 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -107,7 +107,7 @@ struct rte_lpm6 { struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ - alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[0]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[]; /**< LPM tbl8 table. */ }; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v5 5/6] lpm: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 5/6] lpm: " Tyler Retzlaff @ 2024-03-06 20:53 ` Medvedkin, Vladimir 0 siblings, 0 replies; 51+ messages in thread From: Medvedkin, Vladimir @ 2024-03-06 20:53 UTC (permalink / raw) To: Tyler Retzlaff, dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Yipeng Wang, mb, fengchengwen Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> On 06/03/2024 20:13, Tyler Retzlaff wrote: > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> > Reviewed-by: Morten Brørup <mb@smartsharesystems.com> > --- > lib/lpm/rte_lpm6.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c > index 46d8f71..5cc1bb2 100644 > --- a/lib/lpm/rte_lpm6.c > +++ b/lib/lpm/rte_lpm6.c > @@ -107,7 +107,7 @@ struct rte_lpm6 { > > struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ > > - alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[0]; > + alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[]; > /**< LPM tbl8 table. */ > }; > -- Regards, Vladimir ^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 6/6] table: replace zero length array with flex array 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff ` (4 preceding siblings ...) 2024-03-06 20:13 ` [PATCH v5 5/6] lpm: " Tyler Retzlaff @ 2024-03-06 20:13 ` Tyler Retzlaff 2024-06-11 15:15 ` [PATCH v5 0/6] more replacement of zero length array David Marchand 6 siblings, 0 replies; 51+ messages in thread From: Tyler Retzlaff @ 2024-03-06 20:13 UTC (permalink / raw) To: dev Cc: Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen, Tyler Retzlaff Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.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 6f3be6f..78779bb 100644 --- a/lib/table/rte_table_acl.c +++ b/lib/table/rte_table_acl.c @@ -48,7 +48,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 */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; diff --git a/lib/table/rte_table_array.c b/lib/table/rte_table_array.c index 71aada4..84b5d67 100644 --- a/lib/table/rte_table_array.c +++ b/lib/table/rte_table_array.c @@ -40,7 +40,7 @@ struct __rte_cache_aligned rte_table_array { uint32_t entry_pos_mask; /* Internal table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t array[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t array[]; }; static void * diff --git a/lib/table/rte_table_hash_cuckoo.c b/lib/table/rte_table_hash_cuckoo.c index 04668ca..388eae9 100644 --- a/lib/table/rte_table_hash_cuckoo.c +++ b/lib/table/rte_table_hash_cuckoo.c @@ -44,7 +44,7 @@ struct rte_table_hash { struct rte_hash *h_table; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c index ed93f24..91e5037 100644 --- a/lib/table/rte_table_hash_ext.c +++ b/lib/table/rte_table_hash_ext.c @@ -100,7 +100,7 @@ struct rte_table_hash { uint32_t *bkt_ext_stack; /* Table memory */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key16.c b/lib/table/rte_table_hash_key16.c index 6141815..67b77c1 100644 --- a/lib/table/rte_table_hash_key16.c +++ b/lib/table/rte_table_hash_key16.c @@ -85,7 +85,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key32.c b/lib/table/rte_table_hash_key32.c index c8f59ad..1aa86c6 100644 --- a/lib/table/rte_table_hash_key32.c +++ b/lib/table/rte_table_hash_key32.c @@ -85,7 +85,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_key8.c b/lib/table/rte_table_hash_key8.c index cd91a0e..c8d72b3 100644 --- a/lib/table/rte_table_hash_key8.c +++ b/lib/table/rte_table_hash_key8.c @@ -81,7 +81,7 @@ struct rte_table_hash { uint32_t *stack; /* Lookup table */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c index 7b67b99..801e48f 100644 --- a/lib/table/rte_table_hash_lru.c +++ b/lib/table/rte_table_hash_lru.c @@ -77,7 +77,7 @@ struct rte_table_hash { uint32_t *key_stack; /* Table memory */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[]; }; static int diff --git a/lib/table/rte_table_lpm.c b/lib/table/rte_table_lpm.c index 89f8323..3e10c14 100644 --- a/lib/table/rte_table_lpm.c +++ b/lib/table/rte_table_lpm.c @@ -48,7 +48,7 @@ struct rte_table_lpm { /* Next Hop Table (NHT) */ uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS]; - alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[]; }; static void * diff --git a/lib/table/rte_table_lpm_ipv6.c b/lib/table/rte_table_lpm_ipv6.c index 3dec5dd..c1a7412 100644 --- a/lib/table/rte_table_lpm_ipv6.c +++ b/lib/table/rte_table_lpm_ipv6.c @@ -45,7 +45,7 @@ struct rte_table_lpm_ipv6 { /* Next Hop Table (NHT) */ uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS]; - alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[]; }; static void * -- 1.8.3.1 ^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v5 0/6] more replacement of zero length array 2024-03-06 20:13 ` [PATCH v5 " Tyler Retzlaff ` (5 preceding siblings ...) 2024-03-06 20:13 ` [PATCH v5 6/6] table: " Tyler Retzlaff @ 2024-06-11 15:15 ` David Marchand 6 siblings, 0 replies; 51+ messages in thread From: David Marchand @ 2024-06-11 15:15 UTC (permalink / raw) To: Tyler Retzlaff Cc: dev, Bruce Richardson, Cristian Dumitrescu, Honnappa Nagarahalli, Sameh Gobriel, Vladimir Medvedkin, Yipeng Wang, mb, fengchengwen On Wed, Mar 6, 2024 at 9:14 PM Tyler Retzlaff <roretzla@linux.microsoft.com> wrote: > > Replace some missed zero length arrays not captured in the > original series. > https://patchwork.dpdk.org/project/dpdk/list/?series=30410&state=* > > Zero length arrays are a GNU extension that has been > superseded by flex arrays. > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > v5: > * no changes, rebase for upstream merge / conflicts. > > v4: > * add another temporary suppression of libabigail bug > for rte_rcu_qsbr. As with pipeline i cannot see that > rte_rcu_qsbr is nested in any other struct. > > v3: > * add temporary suppression of libabigail bug > https://sourceware.org/bugzilla/show_bug.cgi?id=31377 > * add 2 more patches covering lpm and table > (series ack has not been extended) > * add another zero length array missed in rcu and pipeline > > v2: > * added additional patches for fib & pipeline libs. > series-acks have been placed only against original > hash and rcu patches. > > Tyler Retzlaff (6): > hash: replace zero length array with flex array > rcu: replace zero length array with flex array > fib: replace zero length array with flex array > pipeline: replace zero length array with flex array > lpm: replace zero length array with flex array > table: replace zero length array with flex array > > devtools/libabigail.abignore | 5 +++++ > lib/fib/dir24_8.h | 2 +- > lib/fib/trie.h | 2 +- > lib/hash/rte_thash.c | 4 ++-- > lib/lpm/rte_lpm6.c | 2 +- > lib/pipeline/rte_pipeline.h | 2 +- > lib/pipeline/rte_port_in_action.c | 2 +- > lib/rcu/rcu_qsbr_pvt.h | 2 +- > lib/rcu/rte_rcu_qsbr.h | 2 +- > 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 +- > 19 files changed, 24 insertions(+), 19 deletions(-) libabigail 2.5 got released. I had a try with it in GHA, and the false positive errors around lib/pipeline and lib/rcu are gone. Yet there may still be people using older version, so let's take this series as is with the temporary exceptions. Series applied, thanks. -- David Marchand ^ permalink raw reply [flat|nested] 51+ messages in thread
end of thread, other threads:[~2024-06-11 15:15 UTC | newest] Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` [PATCH v3 6/6] table: " Tyler Retzlaff 2024-02-28 7:27 ` 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
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).