DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: roretzla@linux.microsoft.com, Kai Ji <kai.ji@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: [PATCH] remove extension keyword for flex arrays
Date: Wed, 12 Jun 2024 09:12:40 +0200	[thread overview]
Message-ID: <20240612071240.178800-1-david.marchand@redhat.com> (raw)

Flex arrays are part of the C99 standard.
No need to mark them with __extension__.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I noticed this while reviewing Tyler series on some libraries.
Let's see if the compilers in the CI agrees with the patch.

---
 drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
 lib/cryptodev/rte_cryptodev.h              | 2 +-
 lib/ip_frag/ip_reassembly.h                | 2 +-
 lib/ipsec/ipsec_sad.c                      | 2 +-
 lib/ipsec/sa.h                             | 2 +-
 lib/rib/rte_rib.c                          | 2 +-
 lib/rib/rte_rib6.c                         | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index 52722f94a0..be6dbe9b1b 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -125,7 +125,7 @@ struct ipsec_mb_dev_private {
 	/**< PMD  type */
 	uint32_t max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	__extension__ uint8_t priv[];
+	uint8_t priv[];
 };
 
 /** IPSEC Multi buffer queue pair common queue pair data for all PMDs */
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 00ba6a234a..31881123f9 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1525,7 +1525,7 @@ struct rte_crypto_raw_dp_ctx {
 	cryptodev_sym_raw_operation_done_t dequeue_done;
 
 	/* Driver specific context data */
-	__extension__ uint8_t drv_ctx_data[];
+	uint8_t drv_ctx_data[];
 };
 
 /**
diff --git a/lib/ip_frag/ip_reassembly.h b/lib/ip_frag/ip_reassembly.h
index 5443c738a6..54afed5417 100644
--- a/lib/ip_frag/ip_reassembly.h
+++ b/lib/ip_frag/ip_reassembly.h
@@ -82,7 +82,7 @@ struct rte_ip_frag_tbl {
 	struct ip_frag_pkt *last;     /* last used entry. */
 	struct ip_pkt_list lru;       /* LRU list for table entries. */
 	struct ip_frag_tbl_stat stat; /* statistics counters. */
-	__extension__ struct ip_frag_pkt pkt[]; /* hash table. */
+	struct ip_frag_pkt pkt[]; /* hash table. */
 };
 
 #endif /* _IP_REASSEMBLY_H_ */
diff --git a/lib/ipsec/ipsec_sad.c b/lib/ipsec/ipsec_sad.c
index 7cb492d187..7e147e729c 100644
--- a/lib/ipsec/ipsec_sad.c
+++ b/lib/ipsec/ipsec_sad.c
@@ -42,7 +42,7 @@ struct rte_ipsec_sad {
 	 * (spi_dip or spi_dip_sip). Used only in add/delete
 	 * as a helper struct.
 	 */
-	__extension__ struct hash_cnt cnt_arr[];
+	struct hash_cnt cnt_arr[];
 };
 
 TAILQ_HEAD(rte_ipsec_sad_list, rte_tailq_entry);
diff --git a/lib/ipsec/sa.h b/lib/ipsec/sa.h
index 2560d33d84..719b5c735c 100644
--- a/lib/ipsec/sa.h
+++ b/lib/ipsec/sa.h
@@ -59,7 +59,7 @@ union sym_op_data {
 struct replay_sqn {
 	rte_rwlock_t rwl;
 	uint64_t sqn;
-	__extension__ uint64_t window[];
+	uint64_t window[];
 };
 
 /*IPSEC SA supported algorithms */
diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c
index aa3296de19..b95d329c8b 100644
--- a/lib/rib/rte_rib.c
+++ b/lib/rib/rte_rib.c
@@ -40,7 +40,7 @@ struct rte_rib_node {
 	uint8_t		depth;
 	uint8_t		flag;
 	uint64_t	nh;
-	__extension__ uint64_t ext[];
+	uint64_t ext[];
 };
 
 struct rte_rib {
diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c
index b7df3926f8..89c8390c63 100644
--- a/lib/rib/rte_rib6.c
+++ b/lib/rib/rte_rib6.c
@@ -38,7 +38,7 @@ struct rte_rib6_node {
 	uint8_t			ip[RTE_RIB6_IPV6_ADDR_SIZE];
 	uint8_t			depth;
 	uint8_t			flag;
-	__extension__ uint64_t ext[];
+	uint64_t ext[];
 };
 
 struct rte_rib6 {
-- 
2.44.0


             reply	other threads:[~2024-06-12  7:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  7:12 David Marchand [this message]
2024-06-12  7:43 ` Morten Brørup
2024-06-13 12:55   ` David Marchand

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20240612071240.178800-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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).