[dpdk-dev] [PATCH 9/9] enforce __rte_experimental at the start of symbol declarations

David Marchand david.marchand at redhat.com
Thu Jun 27 13:33:55 CEST 2019


Putting a '__attribute__((deprecated))' in the middle of a function
prototype does not result in the expected result with gcc (while clang
is fine with this syntax).

$ cat deprecated.c
void * __attribute__((deprecated)) incorrect() { return 0; }
__attribute__((deprecated)) void *correct(void) { return 0; }
int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
$ gcc -o deprecated.o -c deprecated.c
deprecated.c: In function ‘main’:
deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at
deprecated.c:2) [-Wdeprecated-declarations]
 int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
 ^

Let's enforce the tag is at the very start of the lines, this is not
perfect but we will trust reviewers to catch the other not so easy to
detect patterns.

tag=__rte_experimental
git grep -l [^^]$tag |grep \\.h$ |while read file; do
	[ "$file" != 'lib/librte_eal/common/include/rte_compat.h' ] ||
		continue
	sed -i -e 's#^\(.*\)  *'$tag'#'$tag' \1#' $file
	sed -i -e 's#^\(..*\)'$tag'#'$tag' \1#' $file
done

Special mention for rte_mbuf_data_addr_default():

There is either a bug or a (not yet understood) issue with gcc.
gcc won't drop this inline when unused and rte_mbuf_data_addr_default()
calls rte_mbuf_buf_addr() which itself is experimental.
This results in a build warning when not accepting experimental apis
from sources just including rte_mbuf.h.

For this specific case, we hide the call to rte_mbuf_buf_addr() under
the ALLOW_EXPERIMENTAL_API flag.

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 devtools/checkpatches.sh                           |  5 +++
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  | 10 ++---
 drivers/net/softnic/rte_eth_softnic.h              |  2 +-
 lib/librte_bbdev/rte_bbdev.h                       | 48 ++++++++++----------
 lib/librte_bbdev/rte_bbdev_op.h                    | 12 ++---
 lib/librte_bbdev/rte_bbdev_pmd.h                   |  8 ++--
 lib/librte_bpf/rte_bpf.h                           | 12 ++---
 lib/librte_bpf/rte_bpf_ethdev.h                    |  8 ++--
 lib/librte_compressdev/rte_comp.h                  | 12 ++---
 lib/librte_compressdev/rte_compressdev.h           | 44 +++++++++---------
 lib/librte_compressdev/rte_compressdev_pmd.h       | 12 ++---
 lib/librte_cryptodev/rte_cryptodev.h               | 28 ++++++------
 .../common/include/arch/x86/rte_atomic_64.h        |  2 +-
 lib/librte_eal/common/include/generic/rte_atomic.h |  2 +-
 lib/librte_eal/common/include/generic/rte_cycles.h |  2 +-
 lib/librte_eal/common/include/generic/rte_rwlock.h |  4 +-
 .../common/include/generic/rte_ticketlock.h        | 18 ++++----
 lib/librte_eal/common/include/rte_dev.h            | 18 ++++----
 lib/librte_eal/common/include/rte_eal.h            | 12 ++---
 lib/librte_eal/common/include/rte_fbarray.h        | 52 +++++++++++-----------
 lib/librte_eal/common/include/rte_interrupts.h     |  2 +-
 lib/librte_eal/common/include/rte_malloc.h         | 20 ++++-----
 lib/librte_eal/common/include/rte_memory.h         | 42 ++++++++---------
 lib/librte_eal/common/include/rte_service.h        |  6 +--
 lib/librte_ethdev/rte_ethdev.h                     | 24 +++++-----
 lib/librte_ethdev/rte_ethdev_driver.h              | 10 ++---
 lib/librte_ethdev/rte_flow_driver.h                |  2 +-
 lib/librte_ethdev/rte_mtr.h                        | 24 +++++-----
 lib/librte_eventdev/rte_event_eth_rx_adapter.h     |  4 +-
 lib/librte_flow_classify/rte_flow_classify.h       | 14 +++---
 lib/librte_hash/rte_hash.h                         |  2 +-
 lib/librte_ip_frag/rte_ip_frag.h                   |  2 +-
 lib/librte_ipsec/rte_ipsec.h                       |  6 +--
 lib/librte_ipsec/rte_ipsec_group.h                 |  4 +-
 lib/librte_ipsec/rte_ipsec_sa.h                    |  8 ++--
 lib/librte_kni/rte_kni.h                           |  2 +-
 lib/librte_mbuf/rte_mbuf.h                         | 15 +++++--
 lib/librte_meter/rte_meter.h                       | 12 ++---
 lib/librte_net/rte_arp.h                           |  2 +-
 lib/librte_net/rte_net.h                           |  2 +-
 lib/librte_pipeline/rte_port_in_action.h           | 16 +++----
 lib/librte_pipeline/rte_table_action.h             | 32 ++++++-------
 lib/librte_power/rte_power_empty_poll.h            | 14 +++---
 lib/librte_rcu/rte_rcu_qsbr.h                      | 26 +++++------
 lib/librte_sched/rte_sched.h                       |  2 +-
 lib/librte_security/rte_security.h                 |  6 +--
 lib/librte_stack/rte_stack.h                       | 14 +++---
 lib/librte_stack/rte_stack_lf.h                    |  4 +-
 lib/librte_stack/rte_stack_std.h                   |  6 +--
 lib/librte_table/rte_table_hash_func.h             | 18 ++++----
 lib/librte_telemetry/rte_telemetry.h               |  6 +--
 lib/librte_telemetry/rte_telemetry_parser.h        |  2 +-
 lib/librte_timer/rte_timer.h                       | 16 +++----
 lib/librte_vhost/rte_vdpa.h                        | 14 +++---
 lib/librte_vhost/rte_vhost.h                       | 22 ++++-----
 lib/librte_vhost/rte_vhost_crypto.h                | 10 ++---
 56 files changed, 367 insertions(+), 355 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 7d61dbe..25e3cc5 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -95,6 +95,11 @@ check_experimental_tags() { # <patch>
 			print "Please only put __rte_experimental tags in headers ("current_file")";
 			ret = 1;
 		}
+		if ($1 != "+__rte_experimental" &&
+		    ($1 != "+" || $2 != "__rte_experimental")) {
+			print "__rte_experimental must be at the start of functions prototype.";
+			ret = 1;
+		}
 	}
 	END {
 		exit ret;
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 84c6884..c0e91c8 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -584,7 +584,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (IXGBE_ERR_SWFW_SYNC) If sw/fw semaphore acquisition failed
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_ixgbe_mdio_lock(uint16_t port);
 
 /**
@@ -597,7 +597,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-ENODEV) if *port* invalid.
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_ixgbe_mdio_unlock(uint16_t port);
 
 /**
@@ -618,7 +618,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (IXGBE_ERR_PHY) If PHY read command failed
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_ixgbe_mdio_unlocked_read(uint16_t port, uint32_t reg_addr,
 				 uint32_t dev_type, uint16_t *phy_data);
 
@@ -641,7 +641,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (IXGBE_ERR_PHY) If PHY read command failed
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_ixgbe_mdio_unlocked_write(uint16_t port, uint32_t reg_addr,
 				  uint32_t dev_type, uint16_t phy_data);
 
@@ -719,6 +719,6 @@ enum {
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable);
 #endif /* _PMD_IXGBE_H_ */
diff --git a/drivers/net/softnic/rte_eth_softnic.h b/drivers/net/softnic/rte_eth_softnic.h
index e8ba2bc..53cd48a 100644
--- a/drivers/net/softnic/rte_eth_softnic.h
+++ b/drivers/net/softnic/rte_eth_softnic.h
@@ -75,7 +75,7 @@
  * @return
  *    Zero on success, error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_pmd_softnic_manage(uint16_t port_id);
 
 #ifdef __cplusplus
diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
index d131692..3775dc4 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -55,7 +55,7 @@ enum rte_bbdev_state {
  * @return
  *   The total number of usable devices.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_bbdev_count(void);
 
 /**
@@ -67,7 +67,7 @@ enum rte_bbdev_state {
  * @return
  *   true if device ID is valid and device is attached, false otherwise.
  */
-bool __rte_experimental
+__rte_experimental bool
 rte_bbdev_is_valid(uint16_t dev_id);
 
 /**
@@ -80,7 +80,7 @@ enum rte_bbdev_state {
  *   - The next device, or
  *   - RTE_BBDEV_MAX_DEVS if none found
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_bbdev_find_next(uint16_t dev_id);
 
 /** Iterate through all enabled devices */
@@ -109,7 +109,7 @@ enum rte_bbdev_state {
  *   - -EBUSY if the identified device has already started
  *   - -ENOMEM if unable to allocate memory
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id);
 
 /**
@@ -126,7 +126,7 @@ enum rte_bbdev_state {
  *   - -EBUSY if the identified device has already started
  *   - -ENOTSUP if the interrupts are not supported by the device
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_intr_enable(uint16_t dev_id);
 
 /** Device queue configuration structure */
@@ -155,7 +155,7 @@ struct rte_bbdev_queue_conf {
  *   - EINVAL if the identified queue size or priority are invalid
  *   - EBUSY if the identified queue or its device have already started
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
 		const struct rte_bbdev_queue_conf *conf);
 
@@ -170,7 +170,7 @@ struct rte_bbdev_queue_conf {
  *   - 0 on success
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_start(uint16_t dev_id);
 
 /**
@@ -183,7 +183,7 @@ struct rte_bbdev_queue_conf {
  * @return
  *   - 0 on success
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_stop(uint16_t dev_id);
 
 /**
@@ -196,7 +196,7 @@ struct rte_bbdev_queue_conf {
  * @return
  *   - 0 on success
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_close(uint16_t dev_id);
 
 /**
@@ -213,7 +213,7 @@ struct rte_bbdev_queue_conf {
  *   - 0 on success
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
 
 /**
@@ -228,7 +228,7 @@ struct rte_bbdev_queue_conf {
  *   - 0 on success
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
 
 /** Device statistics. */
@@ -261,7 +261,7 @@ struct rte_bbdev_stats {
  *   - 0 on success
  *   - EINVAL if invalid parameter pointer is provided
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats);
 
 /**
@@ -272,7 +272,7 @@ struct rte_bbdev_stats {
  * @return
  *   - 0 on success
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_stats_reset(uint16_t dev_id);
 
 /** Device information supplied by the device's driver */
@@ -332,7 +332,7 @@ struct rte_bbdev_info {
  *   - 0 on success
  *   - EINVAL if invalid parameter pointer is provided
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info);
 
 /** Queue information */
@@ -358,7 +358,7 @@ struct rte_bbdev_queue_info {
  *   - 0 on success
  *   - EINVAL if invalid parameter pointer is provided
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_queue_info *queue_info);
 
@@ -466,7 +466,7 @@ struct __rte_cache_aligned rte_bbdev {
  *   The number of operations actually enqueued (this is the number of processed
  *   entries in the @p ops array).
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_bbdev_enqueue_enc_ops(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_enc_op **ops, uint16_t num_ops)
 {
@@ -496,7 +496,7 @@ struct __rte_cache_aligned rte_bbdev {
  *   The number of operations actually enqueued (this is the number of processed
  *   entries in the @p ops array).
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_bbdev_enqueue_dec_ops(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_dec_op **ops, uint16_t num_ops)
 {
@@ -526,7 +526,7 @@ struct __rte_cache_aligned rte_bbdev {
  *   The number of operations actually dequeued (this is the number of entries
  *   copied into the @p ops array).
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_bbdev_dequeue_enc_ops(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_enc_op **ops, uint16_t num_ops)
 {
@@ -557,7 +557,7 @@ struct __rte_cache_aligned rte_bbdev {
  *   copied into the @p ops array).
  */
 
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_bbdev_dequeue_dec_ops(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_dec_op **ops, uint16_t num_ops)
 {
@@ -608,7 +608,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
  * @return
  *   Zero on success, negative value on failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event,
 		rte_bbdev_cb_fn cb_fn, void *cb_arg);
 
@@ -631,7 +631,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
  *   - EINVAL if invalid parameter pointer is provided
  *   - EAGAIN if the provided callback pointer does not exist
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event,
 		rte_bbdev_cb_fn cb_fn, void *cb_arg);
 
@@ -651,7 +651,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
  *   - 0 on success
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
 
 /**
@@ -667,7 +667,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
  *   - 0 on success
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
 
 /**
@@ -694,7 +694,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
  *   - ENOTSUP if interrupts are not supported by the identified device
  *   - negative value on failure - as returned from PMD driver
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
 		void *data);
 
diff --git a/lib/librte_bbdev/rte_bbdev_op.h b/lib/librte_bbdev/rte_bbdev_op.h
index 6be53f5..a36625a 100644
--- a/lib/librte_bbdev/rte_bbdev_op.h
+++ b/lib/librte_bbdev/rte_bbdev_op.h
@@ -461,7 +461,7 @@ struct rte_bbdev_op_pool_private {
  *   Operation type as string or NULL if op_type is invalid
  *
  */
-const char* __rte_experimental
+__rte_experimental const char*
 rte_bbdev_op_type_str(enum rte_bbdev_op_type op_type);
 
 /**
@@ -484,7 +484,7 @@ struct rte_bbdev_op_pool_private {
  *   - Pointer to a mempool on success,
  *   - NULL pointer on failure.
  */
-struct rte_mempool * __rte_experimental
+__rte_experimental struct rte_mempool *
 rte_bbdev_op_pool_create(const char *name, enum rte_bbdev_op_type type,
 		unsigned int num_elements, unsigned int cache_size,
 		int socket_id);
@@ -503,7 +503,7 @@ struct rte_mempool * __rte_experimental
  *   - 0 on success
  *   - EINVAL if invalid mempool is provided
  */
-static inline int __rte_experimental
+__rte_experimental static inline int
 rte_bbdev_enc_op_alloc_bulk(struct rte_mempool *mempool,
 		struct rte_bbdev_enc_op **ops, uint16_t num_ops)
 {
@@ -538,7 +538,7 @@ struct rte_mempool * __rte_experimental
  *   - 0 on success
  *   - EINVAL if invalid mempool is provided
  */
-static inline int __rte_experimental
+__rte_experimental static inline int
 rte_bbdev_dec_op_alloc_bulk(struct rte_mempool *mempool,
 		struct rte_bbdev_dec_op **ops, uint16_t num_ops)
 {
@@ -569,7 +569,7 @@ struct rte_mempool * __rte_experimental
  * @param num_ops
  *   Number of structures
  */
-static inline void __rte_experimental
+__rte_experimental static inline void
 rte_bbdev_dec_op_free_bulk(struct rte_bbdev_dec_op **ops, unsigned int num_ops)
 {
 	if (num_ops > 0)
@@ -586,7 +586,7 @@ struct rte_mempool * __rte_experimental
  * @param num_ops
  *   Number of structures
  */
-static inline void __rte_experimental
+__rte_experimental static inline void
 rte_bbdev_enc_op_free_bulk(struct rte_bbdev_enc_op **ops, unsigned int num_ops)
 {
 	if (num_ops > 0)
diff --git a/lib/librte_bbdev/rte_bbdev_pmd.h b/lib/librte_bbdev/rte_bbdev_pmd.h
index db9a04c..b5aa267 100644
--- a/lib/librte_bbdev/rte_bbdev_pmd.h
+++ b/lib/librte_bbdev/rte_bbdev_pmd.h
@@ -43,7 +43,7 @@
  * @return
  *   - Slot in the rte_bbdev array for a new device;
  */
-struct rte_bbdev * __rte_experimental
+__rte_experimental struct rte_bbdev *
 rte_bbdev_allocate(const char *name);
 
 /**
@@ -55,7 +55,7 @@ struct rte_bbdev * __rte_experimental
  * @return
  *   - 0 on success, negative on error
  */
-int __rte_experimental
+__rte_experimental int
 rte_bbdev_release(struct rte_bbdev *bbdev);
 
 /**
@@ -69,7 +69,7 @@ struct rte_bbdev * __rte_experimental
  *   - NULL otherwise
  *
  */
-struct rte_bbdev * __rte_experimental
+__rte_experimental struct rte_bbdev *
 rte_bbdev_get_named_dev(const char *name);
 
 /**
@@ -187,7 +187,7 @@ struct rte_bbdev_ops {
  * @param ret_param
  *   To pass data back to user application.
  */
-void __rte_experimental
+__rte_experimental void
 rte_bbdev_pmd_callback_process(struct rte_bbdev *dev,
 	enum rte_bbdev_event_type event, void *ret_param);
 
diff --git a/lib/librte_bpf/rte_bpf.h b/lib/librte_bpf/rte_bpf.h
index c8b9601..2f275ed 100644
--- a/lib/librte_bpf/rte_bpf.h
+++ b/lib/librte_bpf/rte_bpf.h
@@ -113,7 +113,7 @@ struct rte_bpf_jit {
  * @param bpf
  *   BPF handle to destroy.
  */
-void __rte_experimental
+__rte_experimental void
 rte_bpf_destroy(struct rte_bpf *bpf);
 
 /**
@@ -128,7 +128,7 @@ struct rte_bpf_jit {
  *   - EINVAL - invalid parameter passed to function
  *   - ENOMEM - can't reserve enough memory
  */
-struct rte_bpf * __rte_experimental
+__rte_experimental struct rte_bpf *
 rte_bpf_load(const struct rte_bpf_prm *prm);
 
 /**
@@ -151,7 +151,7 @@ struct rte_bpf * __rte_experimental
  *   - EINVAL - invalid parameter passed to function
  *   - ENOMEM - can't reserve enough memory
  */
-struct rte_bpf * __rte_experimental
+__rte_experimental struct rte_bpf *
 rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname,
 		const char *sname);
 /**
@@ -164,7 +164,7 @@ struct rte_bpf * __rte_experimental
  * @return
  *   BPF execution return value.
  */
-uint64_t __rte_experimental
+__rte_experimental uint64_t
 rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
 
 /**
@@ -181,7 +181,7 @@ struct rte_bpf * __rte_experimental
  * @return
  *   number of successfully processed inputs.
  */
-uint32_t __rte_experimental
+__rte_experimental uint32_t
 rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[],
 		uint32_t num);
 
@@ -196,7 +196,7 @@ struct rte_bpf * __rte_experimental
  *   - -EINVAL if the parameters are invalid.
  *   - Zero if operation completed successfully.
  */
-int __rte_experimental
+__rte_experimental int
 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit);
 
 #ifdef __cplusplus
diff --git a/lib/librte_bpf/rte_bpf_ethdev.h b/lib/librte_bpf/rte_bpf_ethdev.h
index 1943372..0a63ac2 100644
--- a/lib/librte_bpf/rte_bpf_ethdev.h
+++ b/lib/librte_bpf/rte_bpf_ethdev.h
@@ -45,7 +45,7 @@ enum {
  * @param queue
  *   The identifier of the RX queue on the given port
  */
-void __rte_experimental
+__rte_experimental void
 rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue);
 
 /**
@@ -57,7 +57,7 @@ enum {
  * @param queue
  *   The identifier of the TX queue on the given port
  */
-void __rte_experimental
+__rte_experimental void
 rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue);
 
 /**
@@ -80,7 +80,7 @@ enum {
  * @return
  *   Zero on successful completion or negative error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_bpf_eth_rx_elf_load(uint16_t port, uint16_t queue,
 	const struct rte_bpf_prm *prm, const char *fname, const char *sname,
 	uint32_t flags);
@@ -105,7 +105,7 @@ enum {
  * @return
  *   Zero on successful completion or negative error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_bpf_eth_tx_elf_load(uint16_t port, uint16_t queue,
 	const struct rte_bpf_prm *prm, const char *fname, const char *sname,
 	uint32_t flags);
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 67423bd..a4f35e4 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -420,7 +420,7 @@ struct rte_comp_op {
  *  - On success pointer to mempool
  *  - On failure NULL
  */
-struct rte_mempool * __rte_experimental
+__rte_experimental struct rte_mempool *
 rte_comp_op_pool_create(const char *name,
 		unsigned int nb_elts, unsigned int cache_size,
 		uint16_t user_size, int socket_id);
@@ -435,7 +435,7 @@ struct rte_mempool * __rte_experimental
  * - On success returns a valid rte_comp_op structure
  * - On failure returns NULL
  */
-struct rte_comp_op * __rte_experimental
+__rte_experimental struct rte_comp_op *
 rte_comp_op_alloc(struct rte_mempool *mempool);
 
 /**
@@ -451,7 +451,7 @@ struct rte_comp_op * __rte_experimental
  *   - nb_ops: Success, the nb_ops requested was allocated
  *   - 0: Not enough entries in the mempool; no ops are retrieved.
  */
-int __rte_experimental
+__rte_experimental int
 rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
 		struct rte_comp_op **ops, uint16_t nb_ops);
 
@@ -463,7 +463,7 @@ struct rte_comp_op * __rte_experimental
  * @param op
  *   Compress operation
  */
-void __rte_experimental
+__rte_experimental void
 rte_comp_op_free(struct rte_comp_op *op);
 
 /**
@@ -477,7 +477,7 @@ struct rte_comp_op * __rte_experimental
  * @param nb_ops
  *   Number of operations to free
  */
-void __rte_experimental
+__rte_experimental void
 rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops);
 
 /**
@@ -489,7 +489,7 @@ struct rte_comp_op * __rte_experimental
  * @return
  *   The name of this flag, or NULL if it's not a valid feature flag.
  */
-const char * __rte_experimental
+__rte_experimental const char *
 rte_comp_get_feature_name(uint64_t flag);
 
 #ifdef __cplusplus
diff --git a/lib/librte_compressdev/rte_compressdev.h b/lib/librte_compressdev/rte_compressdev.h
index d3c0000..c3d7797 100644
--- a/lib/librte_compressdev/rte_compressdev.h
+++ b/lib/librte_compressdev/rte_compressdev.h
@@ -50,7 +50,7 @@ struct rte_compressdev_capabilities {
 #define RTE_COMP_END_OF_CAPABILITIES_LIST() \
 	{ RTE_COMP_ALGO_UNSPECIFIED }
 
-const struct rte_compressdev_capabilities * __rte_experimental
+__rte_experimental const struct rte_compressdev_capabilities *
 rte_compressdev_capability_get(uint8_t dev_id,
 			enum rte_comp_algorithm algo);
 
@@ -89,7 +89,7 @@ struct rte_compressdev_capabilities {
  * @return
  *   The name of this flag, or NULL if it's not a valid feature flag.
  */
-const char * __rte_experimental
+__rte_experimental const char *
 rte_compressdev_get_feature_name(uint64_t flag);
 
 /**  comp device information */
@@ -127,7 +127,7 @@ struct rte_compressdev_stats {
  *   - Returns compress device identifier on success.
  *   - Return -1 on failure to find named compress device.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_get_dev_id(const char *name);
 
 /**
@@ -139,7 +139,7 @@ struct rte_compressdev_stats {
  *   - Returns compress device name.
  *   - Returns NULL if compress device is not present.
  */
-const char * __rte_experimental
+__rte_experimental const char *
 rte_compressdev_name_get(uint8_t dev_id);
 
 /**
@@ -149,7 +149,7 @@ struct rte_compressdev_stats {
  * @return
  *   - The total number of usable compress devices.
  */
-uint8_t __rte_experimental
+__rte_experimental uint8_t
 rte_compressdev_count(void);
 
 /**
@@ -166,7 +166,7 @@ struct rte_compressdev_stats {
  * @return
  *   Returns number of attached compress devices.
  */
-uint8_t __rte_experimental
+__rte_experimental uint8_t
 rte_compressdev_devices_get(const char *driver_name, uint8_t *devices,
 		uint8_t nb_devices);
 
@@ -180,7 +180,7 @@ struct rte_compressdev_stats {
  *   a default of zero if the socket could not be determined.
  *   -1 if returned is the dev_id value is out of range.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_socket_id(uint8_t dev_id);
 
 /** Compress device configuration structure */
@@ -210,7 +210,7 @@ struct rte_compressdev_config {
  *   - 0: Success, device configured.
  *   - <0: Error code returned by the driver configuration function.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_configure(uint8_t dev_id,
 			struct rte_compressdev_config *config);
 
@@ -228,7 +228,7 @@ struct rte_compressdev_config {
  *   - 0: Success, device started.
  *   - <0: Error code of the driver device start function.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_start(uint8_t dev_id);
 
 /**
@@ -238,7 +238,7 @@ struct rte_compressdev_config {
  * @param dev_id
  *   Compress device identifier
  */
-void __rte_experimental
+__rte_experimental void
 rte_compressdev_stop(uint8_t dev_id);
 
 /**
@@ -255,7 +255,7 @@ struct rte_compressdev_config {
  *  - 0 on successfully closing device
  *  - <0 on failure to close device
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_close(uint8_t dev_id);
 
 /**
@@ -281,7 +281,7 @@ struct rte_compressdev_config {
  *   - 0: Success, queue pair correctly set up.
  *   - <0: Queue pair configuration failed
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		uint32_t max_inflight_ops, int socket_id);
 
@@ -293,7 +293,7 @@ struct rte_compressdev_config {
  * @return
  *   - The number of configured queue pairs.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_compressdev_queue_pair_count(uint8_t dev_id);
 
 
@@ -310,7 +310,7 @@ struct rte_compressdev_config {
  *   - Zero if successful.
  *   - Non-zero otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats);
 
 /**
@@ -319,7 +319,7 @@ struct rte_compressdev_config {
  * @param dev_id
  *   The identifier of the device.
  */
-void __rte_experimental
+__rte_experimental void
 rte_compressdev_stats_reset(uint8_t dev_id);
 
 /**
@@ -336,7 +336,7 @@ struct rte_compressdev_config {
  * The element after the last valid element has it's op field set to
  * RTE_COMP_ALGO_LIST_END.
  */
-void __rte_experimental
+__rte_experimental void
 rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info);
 
 /**
@@ -393,7 +393,7 @@ struct rte_compressdev_config {
  *   of pointers to *rte_comp_op* structures effectively supplied to the
  *   *ops* array.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
 		struct rte_comp_op **ops, uint16_t nb_ops);
 
@@ -447,7 +447,7 @@ struct rte_compressdev_config {
  *   comp devices queue is full or if invalid parameters are specified in
  *   a *rte_comp_op*.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
 		struct rte_comp_op **ops, uint16_t nb_ops);
 
@@ -475,7 +475,7 @@ struct rte_compressdev_config {
  *  - Returns -ENOMEM if the private stream could not be allocated.
  *
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_stream_create(uint8_t dev_id,
 		const struct rte_comp_xform *xform,
 		void **stream);
@@ -496,7 +496,7 @@ struct rte_compressdev_config {
  *  - Returns -ENOTSUP if comp device does not support STATEFUL operations.
  *  - Returns -EBUSY if can't free stream as there are inflight operations
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_stream_free(uint8_t dev_id, void *stream);
 
 /**
@@ -522,7 +522,7 @@ struct rte_compressdev_config {
  *  - Returns -ENOTSUP if comp device does not support the comp transform.
  *  - Returns -ENOMEM if the private_xform could not be allocated.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_private_xform_create(uint8_t dev_id,
 		const struct rte_comp_xform *xform,
 		void **private_xform);
@@ -543,7 +543,7 @@ struct rte_compressdev_config {
  *  - <0 in error cases
  *  - Returns -EINVAL if input parameters are invalid.
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);
 
 #ifdef __cplusplus
diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
index 043353c..7d947e0 100644
--- a/lib/librte_compressdev/rte_compressdev_pmd.h
+++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -59,7 +59,7 @@ struct rte_compressdev_global {
  * @return
  *   - The rte_compressdev structure pointer for the given device identifier.
  */
-struct rte_compressdev * __rte_experimental
+__rte_experimental struct rte_compressdev *
 rte_compressdev_pmd_get_named_dev(const char *name);
 
 /**
@@ -299,7 +299,7 @@ struct rte_compressdev_ops {
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
-struct rte_compressdev * __rte_experimental
+__rte_experimental struct rte_compressdev *
 rte_compressdev_pmd_allocate(const char *name, int socket_id);
 
 /**
@@ -314,7 +314,7 @@ struct rte_compressdev * __rte_experimental
  * @return
  *   - 0 on success, negative on error
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_pmd_release_device(struct rte_compressdev *dev);
 
 
@@ -336,7 +336,7 @@ struct rte_compressdev * __rte_experimental
  *  - 0 on success
  *  - errno on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_pmd_parse_input_args(
 		struct rte_compressdev_pmd_init_params *params,
 		const char *args);
@@ -357,7 +357,7 @@ struct rte_compressdev * __rte_experimental
  *  - comp device instance on success
  *  - NULL on creation failure
  */
-struct rte_compressdev * __rte_experimental
+__rte_experimental struct rte_compressdev *
 rte_compressdev_pmd_create(const char *name,
 		struct rte_device *device,
 		size_t private_data_size,
@@ -375,7 +375,7 @@ struct rte_compressdev * __rte_experimental
  *  - 0 on success
  *  - errno on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_compressdev_pmd_destroy(struct rte_compressdev *dev);
 
 #ifdef __cplusplus
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 2d4f6d7..09a0468 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -230,7 +230,7 @@ struct rte_cryptodev_asym_capability_idx {
  *   - Return description of the asymmetric crypto capability if exist.
  *   - Return NULL if the capability not exist.
  */
-const struct rte_cryptodev_asymmetric_xform_capability * __rte_experimental
+__rte_experimental const struct rte_cryptodev_asymmetric_xform_capability *
 rte_cryptodev_asym_capability_get(uint8_t dev_id,
 		const struct rte_cryptodev_asym_capability_idx *idx);
 
@@ -299,7 +299,7 @@ struct rte_cryptodev_asym_capability_idx {
  *   - Return 1 if the op type is supported
  *   - Return 0 if unsupported
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_xform_capability_check_optype(
 	const struct rte_cryptodev_asymmetric_xform_capability *capability,
 		enum rte_crypto_asym_op_type op_type);
@@ -314,7 +314,7 @@ struct rte_cryptodev_asym_capability_idx {
  *   - Return 0 if the parameters are in range of the capability.
  *   - Return -1 if the parameters are out of range of the capability.
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_xform_capability_check_modlen(
 	const struct rte_cryptodev_asymmetric_xform_capability *capability,
 		uint16_t modlen);
@@ -375,7 +375,7 @@ struct rte_cryptodev_asym_capability_idx {
  * - Return -1 if string is not valid
  * - Return 0 if the string is valid
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 		const char *xform_string);
 
@@ -1002,7 +1002,7 @@ struct rte_cryptodev_asym_session {
  *  - On success return size of the session
  *  - On failure returns 0
  */
-struct rte_mempool * __rte_experimental
+__rte_experimental struct rte_mempool *
 rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 	uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
 	int socket_id);
@@ -1028,7 +1028,7 @@ struct rte_cryptodev_sym_session *
  *  - On success return pointer to asym-session
  *  - On failure returns NULL
  */
-struct rte_cryptodev_asym_session * __rte_experimental
+__rte_experimental struct rte_cryptodev_asym_session *
 rte_cryptodev_asym_session_create(struct rte_mempool *mempool);
 
 /**
@@ -1058,7 +1058,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *  - -EINVAL if session is NULL.
  *  - -EBUSY if not all device private data has been freed.
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess);
 
 /**
@@ -1098,7 +1098,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *  - -ENOTSUP if crypto device does not support the crypto transform.
  *  - -ENOMEM if the private session could not be allocated.
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_session_init(uint8_t dev_id,
 			struct rte_cryptodev_asym_session *sess,
 			struct rte_crypto_asym_xform *xforms,
@@ -1132,7 +1132,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *  - 0 if successful.
  *  - -EINVAL if device is invalid or session is NULL.
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_asym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_asym_session *sess);
 
@@ -1157,7 +1157,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *   the private data size defined within sess.
  *   - If sess is NULL, return 0.
  */
-unsigned int __rte_experimental
+__rte_experimental unsigned int
 rte_cryptodev_sym_get_existing_header_session_size(
 		struct rte_cryptodev_sym_session *sess);
 
@@ -1167,7 +1167,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  * @return
  *   Size of the asymmetric header session.
  */
-unsigned int __rte_experimental
+__rte_experimental unsigned int
 rte_cryptodev_asym_get_header_session_size(void);
 
 /**
@@ -1194,7 +1194,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *   - Size of the asymmetric private data, if successful
  *   - 0 if device is invalid or does not have private session
  */
-unsigned int __rte_experimental
+__rte_experimental unsigned int
 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
 
 /**
@@ -1229,7 +1229,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_cryptodev_sym_session_set_user_data(
 					struct rte_cryptodev_sym_session *sess,
 					void *data,
@@ -1245,7 +1245,7 @@ struct rte_cryptodev_asym_session * __rte_experimental
  *  - On success return pointer to user data.
  *  - On failure returns NULL.
  */
-void * __rte_experimental
+__rte_experimental void *
 rte_cryptodev_sym_session_get_user_data(
 					struct rte_cryptodev_sym_session *sess);
 
diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h b/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h
index 6232c57..4943a98 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h
@@ -224,7 +224,7 @@ static inline void rte_atomic64_clear(rte_atomic64_t *v)
 	};
 } __rte_aligned(16) rte_int128_t;
 
-static inline int __rte_experimental
+__rte_experimental static inline int
 rte_atomic128_cmp_exchange(rte_int128_t *dst,
 			   rte_int128_t *exp,
 			   const rte_int128_t *src,
diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h b/lib/librte_eal/common/include/generic/rte_atomic.h
index 9958543..1eb55d9 100644
--- a/lib/librte_eal/common/include/generic/rte_atomic.h
+++ b/lib/librte_eal/common/include/generic/rte_atomic.h
@@ -1121,7 +1121,7 @@ static inline void rte_atomic64_clear(rte_atomic64_t *v)
  * @return
  *   Non-zero on success; 0 on failure.
  */
-static inline int __rte_experimental
+__rte_experimental static inline int
 rte_atomic128_cmp_exchange(rte_int128_t *dst,
 			   rte_int128_t *exp,
 			   const rte_int128_t *src,
diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h
index d318b91..4c7e3e0 100644
--- a/lib/librte_eal/common/include/generic/rte_cycles.h
+++ b/lib/librte_eal/common/include/generic/rte_cycles.h
@@ -165,7 +165,7 @@ enum timer_source {
  * @param us
  *   Number of microseconds to wait.
  */
-void __rte_experimental
+__rte_experimental void
 rte_delay_us_sleep(unsigned int us);
 
 /**
diff --git a/lib/librte_eal/common/include/generic/rte_rwlock.h b/lib/librte_eal/common/include/generic/rte_rwlock.h
index 31608fa..4139a04 100644
--- a/lib/librte_eal/common/include/generic/rte_rwlock.h
+++ b/lib/librte_eal/common/include/generic/rte_rwlock.h
@@ -88,7 +88,7 @@
  *   - -EBUSY if lock could not be acquired for reading because a
  *     writer holds the lock
  */
-static inline __rte_experimental int
+__rte_experimental static inline int
 rte_rwlock_read_trylock(rte_rwlock_t *rwl)
 {
 	int32_t x;
@@ -131,7 +131,7 @@
  *   - -EBUSY if lock could not be acquired for writing because
  *     it was already locked for reading or writing
  */
-static inline __rte_experimental int
+__rte_experimental static inline int
 rte_rwlock_write_trylock(rte_rwlock_t *rwl)
 {
 	int32_t x;
diff --git a/lib/librte_eal/common/include/generic/rte_ticketlock.h b/lib/librte_eal/common/include/generic/rte_ticketlock.h
index 191146f..d93d387 100644
--- a/lib/librte_eal/common/include/generic/rte_ticketlock.h
+++ b/lib/librte_eal/common/include/generic/rte_ticketlock.h
@@ -48,7 +48,7 @@
  * @param tl
  *   A pointer to the ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_init(rte_ticketlock_t *tl)
 {
 	__atomic_store_n(&tl->tickets, 0, __ATOMIC_RELAXED);
@@ -60,7 +60,7 @@
  * @param tl
  *   A pointer to the ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_lock(rte_ticketlock_t *tl)
 {
 	uint16_t me = __atomic_fetch_add(&tl->s.next, 1, __ATOMIC_RELAXED);
@@ -74,7 +74,7 @@
  * @param tl
  *   A pointer to the ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_unlock(rte_ticketlock_t *tl)
 {
 	uint16_t i = __atomic_load_n(&tl->s.current, __ATOMIC_RELAXED);
@@ -89,7 +89,7 @@
  * @return
  *   1 if the lock is successfully taken; 0 otherwise.
  */
-static inline __rte_experimental int
+__rte_experimental static inline int
 rte_ticketlock_trylock(rte_ticketlock_t *tl)
 {
 	rte_ticketlock_t old, new;
@@ -113,7 +113,7 @@
  * @return
  *   1 if the lock is currently taken; 0 otherwise.
  */
-static inline __rte_experimental int
+__rte_experimental static inline int
 rte_ticketlock_is_locked(rte_ticketlock_t *tl)
 {
 	rte_ticketlock_t tic;
@@ -144,7 +144,7 @@
  * @param tlr
  *   A pointer to the recursive ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_recursive_init(rte_ticketlock_recursive_t *tlr)
 {
 	rte_ticketlock_init(&tlr->tl);
@@ -158,7 +158,7 @@
  * @param tlr
  *   A pointer to the recursive ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_recursive_lock(rte_ticketlock_recursive_t *tlr)
 {
 	int id = rte_gettid();
@@ -176,7 +176,7 @@
  * @param tlr
  *   A pointer to the recursive ticketlock.
  */
-static inline __rte_experimental void
+__rte_experimental static inline void
 rte_ticketlock_recursive_unlock(rte_ticketlock_recursive_t *tlr)
 {
 	if (--(tlr->count) == 0) {
@@ -194,7 +194,7 @@
  * @return
  *   1 if the lock is successfully taken; 0 otherwise.
  */
-static inline __rte_experimental int
+__rte_experimental static inline int
 rte_ticketlock_recursive_trylock(rte_ticketlock_recursive_t *tlr)
 {
 	int id = rte_gettid();
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index a17023d..6c3b8be 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -363,7 +363,7 @@ struct rte_device *
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_event_callback_register(const char *device_name,
 				rte_dev_event_cb_fn cb_fn,
 				void *cb_arg);
@@ -387,7 +387,7 @@ struct rte_device *
  *  - On success, return the number of callback entities removed.
  *  - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_event_callback_unregister(const char *device_name,
 				  rte_dev_event_cb_fn cb_fn,
 				  void *cb_arg);
@@ -404,7 +404,7 @@ struct rte_device *
  * @param event
  *  the device event type.
  */
-void  __rte_experimental
+__rte_experimental void
 rte_dev_event_callback_process(const char *device_name,
 			       enum rte_dev_event_type event);
 
@@ -418,7 +418,7 @@ struct rte_device *
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_event_monitor_start(void);
 
 /**
@@ -431,7 +431,7 @@ struct rte_device *
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_event_monitor_stop(void);
 
 /**
@@ -444,7 +444,7 @@ struct rte_device *
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_hotplug_handle_enable(void);
 
 /**
@@ -457,7 +457,7 @@ struct rte_device *
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_hotplug_handle_disable(void);
 
 /**
@@ -480,7 +480,7 @@ struct rte_device *
  *	0 if mapping was successful.
  *	Negative value and rte_errno is set otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_dma_map(struct rte_device *dev, void *addr, uint64_t iova, size_t len);
 
 /**
@@ -503,7 +503,7 @@ struct rte_device *
  *	0 if un-mapping was successful.
  *	Negative value and rte_errno is set otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova,
 		  size_t len);
 
diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 27808a3..1500ded 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -275,7 +275,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *  - 0 on success.
  *  - (<0) on failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mp_action_register(const char *name, rte_mp_t action);
 
 /**
@@ -295,7 +295,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *   The name argument plays as the nonredundant key to find the action.
  *
  */
-void __rte_experimental
+__rte_experimental void
 rte_mp_action_unregister(const char *name);
 
 /**
@@ -314,7 +314,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *  - On success, return 0.
  *  - On failure, return -1, and the reason will be stored in rte_errno.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mp_sendmsg(struct rte_mp_msg *msg);
 
 /**
@@ -348,7 +348,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *  - On success, return 0.
  *  - On failure, return -1, and the reason will be stored in rte_errno.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 	       const struct timespec *ts);
 
@@ -377,7 +377,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *  - On success, return 0.
  *  - On failure, return -1, and the reason will be stored in rte_errno.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 		rte_mp_async_reply_t clb);
 
@@ -405,7 +405,7 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  *  - On success, return 0.
  *  - On failure, return -1, and the reason will be stored in rte_errno.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mp_reply(struct rte_mp_msg *msg, const char *peer);
 
 /**
diff --git a/lib/librte_eal/common/include/rte_fbarray.h b/lib/librte_eal/common/include/rte_fbarray.h
index 33841ca..57fb204 100644
--- a/lib/librte_eal/common/include/rte_fbarray.h
+++ b/lib/librte_eal/common/include/rte_fbarray.h
@@ -75,7 +75,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,
 		unsigned int elt_sz);
 
@@ -97,7 +97,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_attach(struct rte_fbarray *arr);
 
 
@@ -118,7 +118,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_destroy(struct rte_fbarray *arr);
 
 
@@ -136,7 +136,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_detach(struct rte_fbarray *arr);
 
 
@@ -153,7 +153,7 @@ struct rte_fbarray {
  *  - non-NULL pointer on success.
  *  - NULL on failure, with ``rte_errno`` indicating reason for failure.
  */
-void * __rte_experimental
+__rte_experimental void *
 rte_fbarray_get(const struct rte_fbarray *arr, unsigned int idx);
 
 
@@ -170,7 +170,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_idx(const struct rte_fbarray *arr, const void *elt);
 
 
@@ -187,7 +187,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_set_used(struct rte_fbarray *arr, unsigned int idx);
 
 
@@ -204,7 +204,7 @@ struct rte_fbarray {
  *  - 0 on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_set_free(struct rte_fbarray *arr, unsigned int idx);
 
 
@@ -222,7 +222,7 @@ struct rte_fbarray {
  *  - 0 if element is unused.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_is_used(struct rte_fbarray *arr, unsigned int idx);
 
 
@@ -239,7 +239,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_next_free(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -256,7 +256,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_next_used(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -276,7 +276,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_next_n_free(struct rte_fbarray *arr, unsigned int start,
 		unsigned int n);
 
@@ -297,7 +297,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_next_n_used(struct rte_fbarray *arr, unsigned int start,
 		unsigned int n);
 
@@ -315,7 +315,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_contig_free(struct rte_fbarray *arr,
 		unsigned int start);
 
@@ -333,7 +333,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_contig_used(struct rte_fbarray *arr, unsigned int start);
 
 /**
@@ -349,7 +349,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_prev_free(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -366,7 +366,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_prev_used(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -387,7 +387,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_prev_n_free(struct rte_fbarray *arr, unsigned int start,
 		unsigned int n);
 
@@ -409,7 +409,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_prev_n_used(struct rte_fbarray *arr, unsigned int start,
 		unsigned int n);
 
@@ -428,7 +428,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_rev_contig_free(struct rte_fbarray *arr,
 		unsigned int start);
 
@@ -447,7 +447,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_rev_contig_used(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -464,7 +464,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_biggest_free(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -481,7 +481,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_biggest_used(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -499,7 +499,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_rev_biggest_free(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -517,7 +517,7 @@ struct rte_fbarray {
  *  - non-negative integer on success.
  *  - -1 on failure, with ``rte_errno`` indicating reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_fbarray_find_rev_biggest_used(struct rte_fbarray *arr, unsigned int start);
 
 
@@ -530,7 +530,7 @@ struct rte_fbarray {
  * @param f
  *   File object to dump information into.
  */
-void __rte_experimental
+__rte_experimental void
 rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f);
 
 #ifdef __cplusplus
diff --git a/lib/librte_eal/common/include/rte_interrupts.h b/lib/librte_eal/common/include/rte_interrupts.h
index 225dae2..109e5a3 100644
--- a/lib/librte_eal/common/include/rte_interrupts.h
+++ b/lib/librte_eal/common/include/rte_interrupts.h
@@ -88,7 +88,7 @@ int rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle,
  *  - On success, return the number of callback entities marked for remove.
  *  - On failure, a negative value.
  */
-int __rte_experimental
+__rte_experimental int
 rte_intr_callback_unregister_pending(const struct rte_intr_handle *intr_handle,
 				rte_intr_callback_fn cb_fn, void *cb_arg,
 				rte_intr_unregister_callback_fn ucb_fn);
diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h
index 5ff1a39..429f7f8 100644
--- a/lib/librte_eal/common/include/rte_malloc.h
+++ b/lib/librte_eal/common/include/rte_malloc.h
@@ -153,7 +153,7 @@ struct rte_malloc_socket_stats {
  *     align is not a power of two).
  *   - Otherwise, the pointer to the reallocated memory.
  */
-void * __rte_experimental
+__rte_experimental void *
 rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket);
 
 /**
@@ -330,7 +330,7 @@ struct rte_malloc_socket_stats {
  *     EPERM  - attempted to add memory to a reserved heap
  *     ENOSPC - no more space in internal config to store a new memory chunk
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_memory_add(const char *heap_name, void *va_addr, size_t len,
 		rte_iova_t iova_addrs[], unsigned int n_pages, size_t page_sz);
 
@@ -361,7 +361,7 @@ struct rte_malloc_socket_stats {
  *     ENOENT - heap or memory chunk was not found
  *     EBUSY  - memory chunk still contains data
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_memory_remove(const char *heap_name, void *va_addr, size_t len);
 
 /**
@@ -385,7 +385,7 @@ struct rte_malloc_socket_stats {
  *     EPERM  - attempted to attach memory to a reserved heap
  *     ENOENT - heap or memory chunk was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_memory_attach(const char *heap_name, void *va_addr, size_t len);
 
 /**
@@ -409,7 +409,7 @@ struct rte_malloc_socket_stats {
  *     EPERM  - attempted to detach memory from a reserved heap
  *     ENOENT - heap or memory chunk was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_memory_detach(const char *heap_name, void *va_addr, size_t len);
 
 /**
@@ -428,7 +428,7 @@ struct rte_malloc_socket_stats {
  *     EEXIST - heap by name of ``heap_name`` already exists
  *     ENOSPC - no more space in internal config to store a new heap
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_create(const char *heap_name);
 
 /**
@@ -451,7 +451,7 @@ struct rte_malloc_socket_stats {
  *     EPERM  - attempting to destroy reserved heap
  *     EBUSY  - heap still contains data
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_destroy(const char *heap_name);
 
 /**
@@ -465,7 +465,7 @@ struct rte_malloc_socket_stats {
  *     EINVAL - ``name`` was NULL
  *     ENOENT - heap identified by the name ``name`` was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_get_socket(const char *name);
 
 /**
@@ -480,7 +480,7 @@ struct rte_malloc_socket_stats {
  *   0 if socket ID refers to internal DPDK memory
  *   -1 if socket ID is invalid
  */
-int __rte_experimental
+__rte_experimental int
 rte_malloc_heap_socket_is_external(int socket_id);
 
 /**
@@ -510,7 +510,7 @@ struct rte_malloc_socket_stats {
  * @param f
  *   A pointer to a file for output
  */
-void __rte_experimental
+__rte_experimental void
 rte_malloc_dump_heaps(FILE *f);
 
 /**
diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h
index 7ca703b..3f159f8 100644
--- a/lib/librte_eal/common/include/rte_memory.h
+++ b/lib/librte_eal/common/include/rte_memory.h
@@ -227,7 +227,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_walk(rte_memseg_walk_t func, void *arg);
 
 /**
@@ -248,7 +248,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_contig_walk(rte_memseg_contig_walk_t func, void *arg);
 
 /**
@@ -269,7 +269,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_list_walk(rte_memseg_list_walk_t func, void *arg);
 
 /**
@@ -287,7 +287,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_walk_thread_unsafe(rte_memseg_walk_t func, void *arg);
 
 /**
@@ -305,7 +305,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_contig_walk_thread_unsafe(rte_memseg_contig_walk_t func, void *arg);
 
 /**
@@ -323,7 +323,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *   1 if stopped by the user
  *   -1 if user function reported error
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_list_walk_thread_unsafe(rte_memseg_list_walk_t func, void *arg);
 
 /**
@@ -347,7 +347,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     - ENOENT  - ``ms`` is an unused segment
  *     - ENOTSUP - segment fd's are not supported
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_get_fd(const struct rte_memseg *ms);
 
 /**
@@ -371,7 +371,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     - ENOENT  - ``ms`` is an unused segment
  *     - ENOTSUP - segment fd's are not supported
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms);
 
 /**
@@ -395,7 +395,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     - ENOENT  - ``ms`` is an unused segment
  *     - ENOTSUP - segment fd's are not supported
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_get_fd_offset(const struct rte_memseg *ms, size_t *offset);
 
 /**
@@ -419,7 +419,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     - ENOENT  - ``ms`` is an unused segment
  *     - ENOTSUP - segment fd's are not supported
  */
-int __rte_experimental
+__rte_experimental int
 rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
 		size_t *offset);
 
@@ -460,7 +460,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     EEXIST - memory chunk is already registered
  *     ENOSPC - no more space in internal config to store a new memory chunk
  */
-int __rte_experimental
+__rte_experimental int
 rte_extmem_register(void *va_addr, size_t len, rte_iova_t iova_addrs[],
 		unsigned int n_pages, size_t page_sz);
 
@@ -490,7 +490,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_extmem_unregister(void *va_addr, size_t len);
 
 /**
@@ -516,7 +516,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_extmem_attach(void *va_addr, size_t len);
 
 /**
@@ -542,7 +542,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-int __rte_experimental
+__rte_experimental int
 rte_extmem_detach(void *va_addr, size_t len);
 
 /**
@@ -595,7 +595,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *  @param maskbits
  *    Address width to check against.
  */
-int __rte_experimental rte_mem_check_dma_mask(uint8_t maskbits);
+__rte_experimental int rte_mem_check_dma_mask(uint8_t maskbits);
 
 /**
  * @warning
@@ -613,7 +613,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *  @param maskbits
  *    Address width to check against.
  */
-int __rte_experimental rte_mem_check_dma_mask_thread_unsafe(uint8_t maskbits);
+__rte_experimental int rte_mem_check_dma_mask_thread_unsafe(uint8_t maskbits);
 
 /**
  * @warning
@@ -623,7 +623,7 @@ typedef int (*rte_memseg_list_walk_t)(const struct rte_memseg_list *msl,
  *  rte_mem_check_dma_mask and rte_mem_check_dma_mask_thread_unsafe can not be
  *  used safely until memory has been initialized.
  */
-void __rte_experimental rte_mem_set_dma_mask(uint8_t maskbits);
+__rte_experimental void rte_mem_set_dma_mask(uint8_t maskbits);
 
 /**
  * Drivers based on uio will not load unless physical
@@ -679,7 +679,7 @@ typedef void (*rte_mem_event_callback_t)(enum rte_mem_event event_type,
  *   -1 on unsuccessful callback register, with rte_errno value indicating
  *   reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mem_event_callback_register(const char *name, rte_mem_event_callback_t clb,
 		void *arg);
 
@@ -697,7 +697,7 @@ typedef void (*rte_mem_event_callback_t)(enum rte_mem_event event_type,
  *   -1 on unsuccessful callback unregister, with rte_errno value indicating
  *   reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mem_event_callback_unregister(const char *name, void *arg);
 
 
@@ -746,7 +746,7 @@ typedef int (*rte_mem_alloc_validator_t)(int socket_id,
  *   -1 on unsuccessful callback register, with rte_errno value indicating
  *   reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mem_alloc_validator_register(const char *name,
 		rte_mem_alloc_validator_t clb, int socket_id, size_t limit);
 
@@ -764,7 +764,7 @@ typedef int (*rte_mem_alloc_validator_t)(int socket_id,
  *   -1 on unsuccessful callback unregister, with rte_errno value indicating
  *   reason for failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mem_alloc_validator_unregister(const char *name, int socket_id);
 
 #ifdef __cplusplus
diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index bf25aec..e54ec50 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -178,7 +178,7 @@ int32_t rte_service_map_lcore_set(uint32_t service_id, uint32_t lcore,
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -401,7 +401,7 @@ int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id,
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value);
 
@@ -416,7 +416,7 @@ int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 50c6936..2a0c0b2 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1453,7 +1453,7 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
  *   Next port id of the device, possibly port_id_start,
  *   RTE_MAX_ETHPORTS if there is none.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_eth_find_next_of(uint16_t port_id_start,
 		const struct rte_device *parent);
 
@@ -1484,7 +1484,7 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
  *   Next sibling port id, possibly port_id_start or ref_port_id itself,
  *   RTE_MAX_ETHPORTS if there is none.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_eth_find_next_sibling(uint16_t port_id_start,
 		uint16_t ref_port_id);
 
@@ -1516,7 +1516,7 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental rte_eth_dev_owner_new(uint64_t *owner_id);
+__rte_experimental int rte_eth_dev_owner_new(uint64_t *owner_id);
 
 /**
  * @warning
@@ -1531,7 +1531,7 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
  * @return
  *  Negative errno value on error, 0 on success.
  */
-int __rte_experimental rte_eth_dev_owner_set(const uint16_t port_id,
+__rte_experimental int rte_eth_dev_owner_set(const uint16_t port_id,
 		const struct rte_eth_dev_owner *owner);
 
 /**
@@ -1547,7 +1547,7 @@ int __rte_experimental rte_eth_dev_owner_set(const uint16_t port_id,
  * @return
  *  0 on success, negative errno value on error.
  */
-int __rte_experimental rte_eth_dev_owner_unset(const uint16_t port_id,
+__rte_experimental int rte_eth_dev_owner_unset(const uint16_t port_id,
 		const uint64_t owner_id);
 
 /**
@@ -1559,7 +1559,7 @@ int __rte_experimental rte_eth_dev_owner_unset(const uint16_t port_id,
  * @param	owner_id
  *  The owner identifier.
  */
-void __rte_experimental rte_eth_dev_owner_delete(const uint64_t owner_id);
+__rte_experimental void rte_eth_dev_owner_delete(const uint64_t owner_id);
 
 /**
  * @warning
@@ -1574,7 +1574,7 @@ int __rte_experimental rte_eth_dev_owner_unset(const uint16_t port_id,
  * @return
  *  0 on success, negative errno value on error..
  */
-int __rte_experimental rte_eth_dev_owner_get(const uint16_t port_id,
+__rte_experimental int rte_eth_dev_owner_get(const uint16_t port_id,
 		struct rte_eth_dev_owner *owner);
 
 /**
@@ -1700,7 +1700,7 @@ int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
  * @return
  *   1 when the Ethernet device is removed, otherwise 0.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_is_removed(uint16_t port_id);
 
 /**
@@ -2928,7 +2928,7 @@ int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
  *           successful.
  *   - (-1) on error.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
 
 /**
@@ -3626,7 +3626,7 @@ int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_get_module_info(uint16_t port_id,
 			    struct rte_eth_dev_module_info *modinfo);
 
@@ -3648,7 +3648,7 @@ int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_get_module_eeprom(uint16_t port_id,
 			      struct rte_dev_eeprom_info *info);
 
@@ -3840,7 +3840,7 @@ int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index f227480..217a02b 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -225,7 +225,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_switch_domain_alloc(uint16_t *domain_id);
 
 /**
@@ -243,7 +243,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_switch_domain_free(uint16_t domain_id);
 
 /** Generic Ethernet device arguments  */
@@ -272,7 +272,7 @@ struct rte_eth_devargs {
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
 
 
@@ -304,7 +304,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_create(struct rte_device *device, const char *name,
 	size_t priv_data_size,
 	ethdev_bus_specific_init bus_specific_init, void *bus_init_params,
@@ -328,7 +328,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-int __rte_experimental
+__rte_experimental int
 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 688f723..e41b815 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -171,7 +171,7 @@ struct rte_flow_expand_rss {
  *
  *   -E2BIG: graph-depth @p graph is too deep.
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 		    const struct rte_flow_item *pattern, uint64_t types,
 		    const struct rte_flow_expand_node graph[],
diff --git a/lib/librte_ethdev/rte_mtr.h b/lib/librte_ethdev/rte_mtr.h
index 88f1301..49be06b 100644
--- a/lib/librte_ethdev/rte_mtr.h
+++ b/lib/librte_ethdev/rte_mtr.h
@@ -438,7 +438,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_capabilities_get(uint16_t port_id,
 	struct rte_mtr_capabilities *cap,
 	struct rte_mtr_error *error);
@@ -461,7 +461,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_profile_add(uint16_t port_id,
 	uint32_t meter_profile_id,
 	struct rte_mtr_meter_profile *profile,
@@ -482,7 +482,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_profile_delete(uint16_t port_id,
 	uint32_t meter_profile_id,
 	struct rte_mtr_error *error);
@@ -510,7 +510,7 @@ struct rte_mtr_error {
  *
  * @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_create(uint16_t port_id,
 	uint32_t mtr_id,
 	struct rte_mtr_params *params,
@@ -533,7 +533,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_destroy(uint16_t port_id,
 	uint32_t mtr_id,
 	struct rte_mtr_error *error);
@@ -560,7 +560,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_disable(uint16_t port_id,
 	uint32_t mtr_id,
 	struct rte_mtr_error *error);
@@ -581,7 +581,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_enable(uint16_t port_id,
 	uint32_t mtr_id,
 	struct rte_mtr_error *error);
@@ -600,7 +600,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_profile_update(uint16_t port_id,
 	uint32_t mtr_id,
 	uint32_t meter_profile_id,
@@ -624,7 +624,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_meter_dscp_table_update(uint16_t port_id,
 	uint32_t mtr_id,
 	enum rte_color *dscp_table,
@@ -650,7 +650,7 @@ struct rte_mtr_error {
  * @return
  *   0 on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_policer_actions_update(uint16_t port_id,
 	uint32_t mtr_id,
 	uint32_t action_mask,
@@ -675,7 +675,7 @@ struct rte_mtr_error {
  *
  * @see enum rte_mtr_stats_type
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_stats_update(uint16_t port_id,
 	uint32_t mtr_id,
 	uint64_t stats_mask,
@@ -706,7 +706,7 @@ struct rte_mtr_error {
  *
  * @see enum rte_mtr_stats_type
  */
-int __rte_experimental
+__rte_experimental int
 rte_mtr_stats_read(uint16_t port_id,
 	uint32_t mtr_id,
 	struct rte_mtr_stats *stats,
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
index beab870..0423c08 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
@@ -413,7 +413,7 @@ int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
  *  - 0: Success, retrieved successfully.
  *  - <0: Error code on failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_event_eth_rx_adapter_stats_get(uint8_t id,
 				struct rte_event_eth_rx_adapter_stats *stats);
 
@@ -466,7 +466,7 @@ int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
  *  - 0: Success
  *  - <0: Error code on failure.
  */
-int __rte_experimental
+__rte_experimental int
 rte_event_eth_rx_adapter_cb_register(uint8_t id,
 				uint16_t eth_dev_id,
 				rte_event_eth_rx_adapter_cb_fn cb_fn,
diff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h
index 01e88e5..eefadfc 100644
--- a/lib/librte_flow_classify/rte_flow_classify.h
+++ b/lib/librte_flow_classify/rte_flow_classify.h
@@ -155,7 +155,7 @@ struct rte_flow_classify_ipv4_5tuple_stats {
  * @return
  *   Handle to flow classifier instance on success or NULL otherwise
  */
-struct rte_flow_classifier * __rte_experimental
+__rte_experimental struct rte_flow_classifier *
 rte_flow_classifier_create(struct rte_flow_classifier_params *params);
 
 /**
@@ -166,7 +166,7 @@ struct rte_flow_classifier * __rte_experimental
  * @return
  *   0 on success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_classifier_free(struct rte_flow_classifier *cls);
 
 /**
@@ -179,7 +179,7 @@ struct rte_flow_classifier * __rte_experimental
  * @return
  *   0 on success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_classify_table_create(struct rte_flow_classifier *cls,
 		struct rte_flow_classify_table_params *params);
 
@@ -200,7 +200,7 @@ struct rte_flow_classifier * __rte_experimental
  * @return
  *   0 on success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_classify_validate(struct rte_flow_classifier *cls,
 		const struct rte_flow_attr *attr,
 		const struct rte_flow_item pattern[],
@@ -226,7 +226,7 @@ struct rte_flow_classifier * __rte_experimental
  * @return
  *   A valid handle in case of success, NULL otherwise.
  */
-struct rte_flow_classify_rule * __rte_experimental
+__rte_experimental struct rte_flow_classify_rule *
 rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,
 		const struct rte_flow_attr *attr,
 		const struct rte_flow_item pattern[],
@@ -244,7 +244,7 @@ struct rte_flow_classify_rule * __rte_experimental
  * @return
  *   0 on success, error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
 		struct rte_flow_classify_rule *rule);
 
@@ -265,7 +265,7 @@ struct rte_flow_classify_rule * __rte_experimental
  * @return
  *   0 on success, error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_flow_classifier_query(struct rte_flow_classifier *cls,
 		struct rte_mbuf **pkts,
 		const uint16_t nb_pkts,
diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 4432aef..20ca990 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -366,7 +366,7 @@ struct rte_hash *
  *   - 0 if freed successfully
  *   - -EINVAL if the parameters are invalid.
  */
-int __rte_experimental
+__rte_experimental int
 rte_hash_free_key_with_position(const struct rte_hash *h,
 				const int32_t position);
 
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 2273f38..1c2a7e2 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -348,7 +348,7 @@ void rte_ip_frag_free_death_row(struct rte_ip_frag_death_row *dr,
  * @param tms
  *   Current timestamp
  */
-void __rte_experimental
+__rte_experimental void
 rte_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl,
 	struct rte_ip_frag_death_row *dr, uint64_t tms);
 
diff --git a/lib/librte_ipsec/rte_ipsec.h b/lib/librte_ipsec/rte_ipsec.h
index ff1ec80..b7dfc37 100644
--- a/lib/librte_ipsec/rte_ipsec.h
+++ b/lib/librte_ipsec/rte_ipsec.h
@@ -84,7 +84,7 @@ struct rte_ipsec_session {
  *   - Zero if operation completed successfully.
  *   - -EINVAL if the parameters are invalid.
  */
-int __rte_experimental
+__rte_experimental int
 rte_ipsec_session_prepare(struct rte_ipsec_session *ss);
 
 /**
@@ -108,7 +108,7 @@ struct rte_ipsec_session {
  * @return
  *   Number of successfully processed packets, with error code set in rte_errno.
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_ipsec_pkt_crypto_prepare(const struct rte_ipsec_session *ss,
 	struct rte_mbuf *mb[], struct rte_crypto_op *cop[], uint16_t num)
 {
@@ -138,7 +138,7 @@ struct rte_ipsec_session {
  * @return
  *   Number of successfully processed packets, with error code set in rte_errno.
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_ipsec_pkt_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
 	uint16_t num)
 {
diff --git a/lib/librte_ipsec/rte_ipsec_group.h b/lib/librte_ipsec/rte_ipsec_group.h
index 740fa7c..1de96d4 100644
--- a/lib/librte_ipsec/rte_ipsec_group.h
+++ b/lib/librte_ipsec/rte_ipsec_group.h
@@ -42,7 +42,7 @@ struct rte_ipsec_group {
  * @return
  *   The pointer to the related *rte_ipsec_session* structure.
  */
-static inline __rte_experimental struct rte_ipsec_session *
+__rte_experimental static inline struct rte_ipsec_session *
 rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop)
 {
 	const struct rte_security_session *ss;
@@ -78,7 +78,7 @@ struct rte_ipsec_group {
  * @return
  *   Number of filled elements in *grp* array.
  */
-static inline uint16_t __rte_experimental
+__rte_experimental static inline uint16_t
 rte_ipsec_pkt_crypto_group(const struct rte_crypto_op *cop[],
 	struct rte_mbuf *mb[], struct rte_ipsec_group grp[], uint16_t num)
 {
diff --git a/lib/librte_ipsec/rte_ipsec_sa.h b/lib/librte_ipsec/rte_ipsec_sa.h
index fd9b3ed..5070701 100644
--- a/lib/librte_ipsec/rte_ipsec_sa.h
+++ b/lib/librte_ipsec/rte_ipsec_sa.h
@@ -128,7 +128,7 @@ enum {
  * @return
  *   SA type value.
  */
-uint64_t __rte_experimental
+__rte_experimental uint64_t
 rte_ipsec_sa_type(const struct rte_ipsec_sa *sa);
 
 /**
@@ -139,7 +139,7 @@ enum {
  *   - Actual size required for SA with given parameters.
  *   - -EINVAL if the parameters are invalid.
  */
-int __rte_experimental
+__rte_experimental int
 rte_ipsec_sa_size(const struct rte_ipsec_sa_prm *prm);
 
 /**
@@ -155,7 +155,7 @@ enum {
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if the size of the provided buffer is not big enough.
  */
-int __rte_experimental
+__rte_experimental int
 rte_ipsec_sa_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm,
 	uint32_t size);
 
@@ -164,7 +164,7 @@ enum {
  * @param sa
  *   Pointer to SA object to de-initialize.
  */
-void __rte_experimental
+__rte_experimental void
 rte_ipsec_sa_fini(struct rte_ipsec_sa *sa);
 
 #ifdef __cplusplus
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index e11a32b..dda7de6 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -249,7 +249,7 @@ unsigned rte_kni_tx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs,
  *  Previous link state == linkdown: 0
  *  Previous link state == linkup: 1
  */
-int __rte_experimental
+__rte_experimental int
 rte_kni_update_link(struct rte_kni *kni, unsigned int linkup);
 
 /**
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 0d9fef0..21a8870 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -866,7 +866,7 @@ struct rte_mbuf_ext_shared_info {
  * @return
  *   The pointer of the mbuf buffer.
  */
-static inline char * __rte_experimental
+__rte_experimental static inline char *
 rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp)
 {
 	return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
@@ -883,10 +883,17 @@ struct rte_mbuf_ext_shared_info {
  * @return
  *   The pointer of the beginning of the mbuf data.
  */
-static inline char * __rte_experimental
-rte_mbuf_data_addr_default(struct rte_mbuf *mb)
+__rte_experimental static inline char *
+rte_mbuf_data_addr_default(struct rte_mbuf *mb __rte_unused)
 {
+	/* gcc complains about calling this experimental function even
+	 * when not using it. Hide it with ALLOW_EXPERIMENTAL_API.
+	 */
+#ifdef ALLOW_EXPERIMENTAL_API
 	return rte_mbuf_buf_addr(mb, mb->pool) + RTE_PKTMBUF_HEADROOM;
+#else
+	return NULL;
+#endif
 }
 
 /**
@@ -926,7 +933,7 @@ struct rte_mbuf_ext_shared_info {
  * @return
  *   The starting address of the private data area of the given mbuf.
  */
-static inline void * __rte_experimental
+__rte_experimental static inline void *
 rte_mbuf_to_priv(struct rte_mbuf *m)
 {
 	return RTE_PTR_ADD(m, sizeof(struct rte_mbuf));
diff --git a/lib/librte_meter/rte_meter.h b/lib/librte_meter/rte_meter.h
index 3e383d2..59f7b90 100644
--- a/lib/librte_meter/rte_meter.h
+++ b/lib/librte_meter/rte_meter.h
@@ -140,7 +140,7 @@ struct rte_meter_trtcm_rfc4115_params {
  * @return
  *    0 upon success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_meter_trtcm_rfc4115_profile_config(
 	struct rte_meter_trtcm_rfc4115_profile *p,
 	struct rte_meter_trtcm_rfc4115_params *params);
@@ -186,7 +186,7 @@ struct rte_meter_trtcm_rfc4115_params {
  * @return
  *    0 upon success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_meter_trtcm_rfc4115_config(struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p);
 
@@ -293,7 +293,7 @@ struct rte_meter_trtcm_rfc4115_params {
  * @return
  *    Color assigned to the current IP packet
  */
-static inline enum rte_color __rte_experimental
+__rte_experimental static inline enum rte_color
 rte_meter_trtcm_rfc4115_color_blind_check(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p,
@@ -319,7 +319,7 @@ struct rte_meter_trtcm_rfc4115_params {
  * @return
  *    Color assigned to the current IP packet
  */
-static inline enum rte_color __rte_experimental
+__rte_experimental static inline enum rte_color
 rte_meter_trtcm_rfc4115_color_aware_check(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p,
@@ -578,7 +578,7 @@ struct rte_meter_trtcm_rfc4115 {
 	return RTE_COLOR_GREEN;
 }
 
-static inline enum rte_color __rte_experimental
+__rte_experimental static inline enum rte_color
 rte_meter_trtcm_rfc4115_color_blind_check(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p,
@@ -621,7 +621,7 @@ struct rte_meter_trtcm_rfc4115 {
 	return RTE_COLOR_RED;
 }
 
-static inline enum rte_color __rte_experimental
+__rte_experimental static inline enum rte_color
 rte_meter_trtcm_rfc4115_color_aware_check(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p,
diff --git a/lib/librte_net/rte_arp.h b/lib/librte_net/rte_arp.h
index f17c529..6db6dfa 100644
--- a/lib/librte_net/rte_arp.h
+++ b/lib/librte_net/rte_arp.h
@@ -63,7 +63,7 @@ struct rte_arp_hdr {
  * @return
  *   - RARP packet pointer on success, or NULL on error
  */
-struct rte_mbuf * __rte_experimental
+__rte_experimental struct rte_mbuf *
 rte_net_make_rarp_packet(struct rte_mempool *mpool,
 		const struct rte_ether_addr *mac);
 
diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index 7088584..f219621 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -51,7 +51,7 @@ struct rte_net_hdr_lens {
  *   Protocol that follows IPv6 header.
  *   -1 if an error occurs during mbuf parsing.
  */
-int __rte_experimental
+__rte_experimental int
 rte_net_skip_ip6_ext(uint16_t proto, const struct rte_mbuf *m, uint32_t *off,
 	int *frag);
 
diff --git a/lib/librte_pipeline/rte_port_in_action.h b/lib/librte_pipeline/rte_port_in_action.h
index 0a85e4e..3e0d4a6 100644
--- a/lib/librte_pipeline/rte_port_in_action.h
+++ b/lib/librte_pipeline/rte_port_in_action.h
@@ -172,7 +172,7 @@ struct rte_port_in_action_lb_params {
  * @return
  *   Input port action profile handle on success, NULL otherwise.
  */
-struct rte_port_in_action_profile * __rte_experimental
+__rte_experimental struct rte_port_in_action_profile *
 rte_port_in_action_profile_create(uint32_t socket_id);
 
 /**
@@ -183,7 +183,7 @@ struct rte_port_in_action_profile * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_profile_free(struct rte_port_in_action_profile *profile);
 
 /**
@@ -201,7 +201,7 @@ struct rte_port_in_action_profile * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_profile_action_register(
 	struct rte_port_in_action_profile *profile,
 	enum rte_port_in_action_type type,
@@ -223,7 +223,7 @@ struct rte_port_in_action_profile * __rte_experimental
  *
  * @see rte_port_in_action_create()
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_profile_freeze(struct rte_port_in_action_profile *profile);
 
 /**
@@ -245,7 +245,7 @@ struct rte_port_in_action_profile * __rte_experimental
  * @return
  *   Handle to input port action object on success, NULL on error.
  */
-struct rte_port_in_action * __rte_experimental
+__rte_experimental struct rte_port_in_action *
 rte_port_in_action_create(struct rte_port_in_action_profile *profile,
 	uint32_t socket_id);
 
@@ -257,7 +257,7 @@ struct rte_port_in_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_free(struct rte_port_in_action *action);
 
 /**
@@ -270,7 +270,7 @@ struct rte_port_in_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_params_get(struct rte_port_in_action *action,
 	struct rte_pipeline_port_in_params *params);
 
@@ -289,7 +289,7 @@ struct rte_port_in_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_port_in_action_apply(struct rte_port_in_action *action,
 	enum rte_port_in_action_type type,
 	void *action_params);
diff --git a/lib/librte_pipeline/rte_table_action.h b/lib/librte_pipeline/rte_table_action.h
index ef45a30..da4ec42 100644
--- a/lib/librte_pipeline/rte_table_action.h
+++ b/lib/librte_pipeline/rte_table_action.h
@@ -823,7 +823,7 @@ struct rte_table_action_decap_params {
  * @return
  *   Table action profile handle on success, NULL otherwise.
  */
-struct rte_table_action_profile * __rte_experimental
+__rte_experimental struct rte_table_action_profile *
 rte_table_action_profile_create(struct rte_table_action_common_config *common);
 
 /**
@@ -834,7 +834,7 @@ struct rte_table_action_profile * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_profile_free(struct rte_table_action_profile *profile);
 
 /**
@@ -852,7 +852,7 @@ struct rte_table_action_profile * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_profile_action_register(struct rte_table_action_profile *profile,
 	enum rte_table_action_type type,
 	void *action_config);
@@ -872,7 +872,7 @@ struct rte_table_action_profile * __rte_experimental
  *
  * @see rte_table_action_create()
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_profile_freeze(struct rte_table_action_profile *profile);
 
 /**
@@ -895,7 +895,7 @@ struct rte_table_action_profile * __rte_experimental
  *
  * @see rte_table_action_create()
  */
-struct rte_table_action * __rte_experimental
+__rte_experimental struct rte_table_action *
 rte_table_action_create(struct rte_table_action_profile *profile,
 	uint32_t socket_id);
 
@@ -907,7 +907,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_free(struct rte_table_action *action);
 
 /**
@@ -920,7 +920,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_table_params_get(struct rte_table_action *action,
 	struct rte_pipeline_table_params *params);
 
@@ -942,7 +942,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_apply(struct rte_table_action *action,
 	void *data,
 	enum rte_table_action_type type,
@@ -961,7 +961,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_dscp_table_update(struct rte_table_action *action,
 	uint64_t dscp_mask,
 	struct rte_table_action_dscp_table *table);
@@ -980,7 +980,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_meter_profile_add(struct rte_table_action *action,
 	uint32_t meter_profile_id,
 	struct rte_table_action_meter_profile *profile);
@@ -996,7 +996,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_meter_profile_delete(struct rte_table_action *action,
 	uint32_t meter_profile_id);
 
@@ -1027,7 +1027,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_meter_read(struct rte_table_action *action,
 	void *data,
 	uint32_t tc_mask,
@@ -1053,7 +1053,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_ttl_read(struct rte_table_action *action,
 	void *data,
 	struct rte_table_action_ttl_counters *stats,
@@ -1078,7 +1078,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_stats_read(struct rte_table_action *action,
 	void *data,
 	struct rte_table_action_stats_counters *stats,
@@ -1098,7 +1098,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   Zero on success, non-zero error code otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_table_action_time_read(struct rte_table_action *action,
 	void *data,
 	uint64_t *timestamp);
@@ -1113,7 +1113,7 @@ struct rte_table_action * __rte_experimental
  * @return
  *   The pointer to the session on success, NULL otherwise.
  */
-struct rte_cryptodev_sym_session *__rte_experimental
+__rte_experimental struct rte_cryptodev_sym_session *
 rte_table_action_crypto_sym_session_get(struct rte_table_action *action,
 	void *data);
 
diff --git a/lib/librte_power/rte_power_empty_poll.h b/lib/librte_power/rte_power_empty_poll.h
index 33f24e0..e246a09 100644
--- a/lib/librte_power/rte_power_empty_poll.h
+++ b/lib/librte_power/rte_power_empty_poll.h
@@ -142,14 +142,14 @@ struct ep_policy {
  *  - 0 on success.
  *  - Negative on error.
  */
-int __rte_experimental
+__rte_experimental int
 rte_power_empty_poll_stat_init(struct ep_params **eptr, uint8_t *freq_tlb,
 		struct ep_policy *policy);
 
 /**
  * Free the resource hold by power management system.
  */
-void __rte_experimental
+__rte_experimental void
 rte_power_empty_poll_stat_free(void);
 
 /**
@@ -163,7 +163,7 @@ struct ep_policy {
  *  - 0 on success.
  *  - Negative on error.
  */
-int __rte_experimental
+__rte_experimental int
 rte_power_empty_poll_stat_update(unsigned int lcore_id);
 
 /**
@@ -178,7 +178,7 @@ struct ep_policy {
  *  - 0 on success.
  *  - Negative on error.
  */
-int __rte_experimental
+__rte_experimental int
 rte_power_poll_stat_update(unsigned int lcore_id, uint8_t nb_pkt);
 
 /**
@@ -190,7 +190,7 @@ struct ep_policy {
  * @return
  *  Current lcore empty poll counter value.
  */
-uint64_t __rte_experimental
+__rte_experimental uint64_t
 rte_power_empty_poll_stat_fetch(unsigned int lcore_id);
 
 /**
@@ -202,7 +202,7 @@ struct ep_policy {
  * @return
  *  Current lcore valid poll counter value.
  */
-uint64_t __rte_experimental
+__rte_experimental uint64_t
 rte_power_poll_stat_fetch(unsigned int lcore_id);
 
 /**
@@ -213,7 +213,7 @@ struct ep_policy {
  * @param  arg
  *  The customized parameter
  */
-void  __rte_experimental
+__rte_experimental void
 rte_empty_poll_detection(struct rte_timer *tim, void *arg);
 
 #ifdef __cplusplus
diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
index 9727f49..b48ed47 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.h
+++ b/lib/librte_rcu/rte_rcu_qsbr.h
@@ -122,7 +122,7 @@ struct rte_rcu_qsbr {
  *   Possible rte_errno codes are:
  *   - EINVAL - max_threads is 0
  */
-size_t __rte_experimental
+__rte_experimental size_t
 rte_rcu_qsbr_get_memsize(uint32_t max_threads);
 
 /**
@@ -143,7 +143,7 @@ struct rte_rcu_qsbr {
  *   - EINVAL - max_threads is 0 or 'v' is NULL.
  *
  */
-int __rte_experimental
+__rte_experimental int
 rte_rcu_qsbr_init(struct rte_rcu_qsbr *v, uint32_t max_threads);
 
 /**
@@ -169,7 +169,7 @@ struct rte_rcu_qsbr {
  *   the QS variable. thread_id is a value between 0 and (max_threads - 1).
  *   'max_threads' is the parameter passed in 'rte_rcu_qsbr_init' API.
  */
-int __rte_experimental
+__rte_experimental int
 rte_rcu_qsbr_thread_register(struct rte_rcu_qsbr *v, unsigned int thread_id);
 
 /**
@@ -190,7 +190,7 @@ struct rte_rcu_qsbr {
  *   Reader thread with this thread ID will stop reporting its quiescent
  *   state on the QS variable.
  */
-int __rte_experimental
+__rte_experimental int
 rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id);
 
 /**
@@ -221,7 +221,7 @@ struct rte_rcu_qsbr {
  *   Reader thread with this thread ID will report its quiescent state on
  *   the QS variable.
  */
-static __rte_always_inline void __rte_experimental
+__rte_experimental static __rte_always_inline void
 rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
 {
 	uint64_t t;
@@ -282,7 +282,7 @@ struct rte_rcu_qsbr {
  *   rte_rcu_qsbr_check API will not wait for the reader thread with
  *   this thread ID to report its quiescent state on the QS variable.
  */
-static __rte_always_inline void __rte_experimental
+__rte_experimental static __rte_always_inline void
 rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
 {
 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);
@@ -322,7 +322,7 @@ struct rte_rcu_qsbr {
  * @param thread_id
  *   Reader thread id
  */
-static __rte_always_inline void __rte_experimental
+__rte_experimental static __rte_always_inline void
 rte_rcu_qsbr_lock(__rte_unused struct rte_rcu_qsbr *v,
 			__rte_unused unsigned int thread_id)
 {
@@ -358,7 +358,7 @@ struct rte_rcu_qsbr {
  * @param thread_id
  *   Reader thread id
  */
-static __rte_always_inline void __rte_experimental
+__rte_experimental static __rte_always_inline void
 rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
 			__rte_unused unsigned int thread_id)
 {
@@ -391,7 +391,7 @@ struct rte_rcu_qsbr {
  *   - This is the token for this call of the API. This should be
  *     passed to rte_rcu_qsbr_check API.
  */
-static __rte_always_inline uint64_t __rte_experimental
+__rte_experimental static __rte_always_inline uint64_t
 rte_rcu_qsbr_start(struct rte_rcu_qsbr *v)
 {
 	uint64_t t;
@@ -423,7 +423,7 @@ struct rte_rcu_qsbr {
  * @param thread_id
  *   Update the quiescent state for the reader with this thread ID.
  */
-static __rte_always_inline void __rte_experimental
+__rte_experimental static __rte_always_inline void
 rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
 {
 	uint64_t t;
@@ -578,7 +578,7 @@ struct rte_rcu_qsbr {
  *   - 1 if all reader threads have passed through specified number
  *     of quiescent states.
  */
-static __rte_always_inline int __rte_experimental
+__rte_experimental static __rte_always_inline int
 rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 {
 	RTE_ASSERT(v != NULL);
@@ -610,7 +610,7 @@ struct rte_rcu_qsbr {
  *   on this QS variable (i.e. the calling thread is also part of the
  *   readside critical section). If not, pass RTE_QSBR_THRID_INVALID.
  */
-void __rte_experimental
+__rte_experimental void
 rte_rcu_qsbr_synchronize(struct rte_rcu_qsbr *v, unsigned int thread_id);
 
 /**
@@ -631,7 +631,7 @@ struct rte_rcu_qsbr {
  *   Possible rte_errno codes are:
  *   - EINVAL - NULL parameters are passed
  */
-int __rte_experimental
+__rte_experimental int
 rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v);
 
 #ifdef __cplusplus
diff --git a/lib/librte_sched/rte_sched.h b/lib/librte_sched/rte_sched.h
index 9c55a78..a6ef9ee 100644
--- a/lib/librte_sched/rte_sched.h
+++ b/lib/librte_sched/rte_sched.h
@@ -249,7 +249,7 @@ struct rte_sched_port *
  * @return
  *   0 upon success, error code otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_sched_port_pipe_profile_add(struct rte_sched_port *port,
 	struct rte_sched_pipe_params *params,
 	uint32_t *pipe_profile_id);
diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index 76f54e0..0292d93 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -346,7 +346,7 @@ struct rte_security_session *
  *  - On success returns 0
  *  - On failure return errno
  */
-int __rte_experimental
+__rte_experimental int
 rte_security_session_update(struct rte_security_ctx *instance,
 			    struct rte_security_session *sess,
 			    struct rte_security_session_conf *conf);
@@ -414,7 +414,7 @@ struct rte_security_session *
  *  - On success, userdata
  *  - On failure, NULL
  */
-void * __rte_experimental
+__rte_experimental void *
 rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md);
 
 /**
@@ -501,7 +501,7 @@ struct rte_security_stats {
  *  - On success return 0
  *  - On failure errno
  */
-int __rte_experimental
+__rte_experimental int
 rte_security_session_stats_get(struct rte_security_ctx *instance,
 			       struct rte_security_session *sess,
 			       struct rte_security_stats *stats);
diff --git a/lib/librte_stack/rte_stack.h b/lib/librte_stack/rte_stack.h
index fe048f0..cc0898c 100644
--- a/lib/librte_stack/rte_stack.h
+++ b/lib/librte_stack/rte_stack.h
@@ -112,7 +112,7 @@ struct rte_stack {
  * @return
  *   Actual number of objects pushed (either 0 or *n*).
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 rte_stack_push(struct rte_stack *s, void * const *obj_table, unsigned int n)
 {
 	RTE_ASSERT(s != NULL);
@@ -139,7 +139,7 @@ struct rte_stack {
  * @return
  *   Actual number of objects popped (either 0 or *n*).
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 rte_stack_pop(struct rte_stack *s, void **obj_table, unsigned int n)
 {
 	RTE_ASSERT(s != NULL);
@@ -162,7 +162,7 @@ struct rte_stack {
  * @return
  *   The number of used entries in the stack.
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 rte_stack_count(struct rte_stack *s)
 {
 	RTE_ASSERT(s != NULL);
@@ -184,7 +184,7 @@ struct rte_stack {
  * @return
  *   The number of free entries in the stack.
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 rte_stack_free_count(struct rte_stack *s)
 {
 	RTE_ASSERT(s != NULL);
@@ -222,7 +222,7 @@ struct rte_stack {
  *    - ENOMEM - insufficient memory to create the stack
  *    - ENAMETOOLONG - name size exceeds RTE_STACK_NAMESIZE
  */
-struct rte_stack *__rte_experimental
+__rte_experimental struct rte_stack *
 rte_stack_create(const char *name, unsigned int count, int socket_id,
 		 uint32_t flags);
 
@@ -235,7 +235,7 @@ struct rte_stack *__rte_experimental
  * @param s
  *   Stack to free
  */
-void __rte_experimental
+__rte_experimental void
 rte_stack_free(struct rte_stack *s);
 
 /**
@@ -252,7 +252,7 @@ struct rte_stack *__rte_experimental
  *    - ENOENT - Stack with name *name* not found.
  *    - EINVAL - *name* pointer is NULL.
  */
-struct rte_stack * __rte_experimental
+__rte_experimental struct rte_stack *
 rte_stack_lookup(const char *name);
 
 #ifdef __cplusplus
diff --git a/lib/librte_stack/rte_stack_lf.h b/lib/librte_stack/rte_stack_lf.h
index 518889a..28702b2 100644
--- a/lib/librte_stack/rte_stack_lf.h
+++ b/lib/librte_stack/rte_stack_lf.h
@@ -23,7 +23,7 @@
  * @return
  *   Actual number of objects enqueued.
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 __rte_stack_lf_push(struct rte_stack *s,
 		    void * const *obj_table,
 		    unsigned int n)
@@ -61,7 +61,7 @@
  * @return
  *   - Actual number of objects popped.
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 __rte_stack_lf_pop(struct rte_stack *s, void **obj_table, unsigned int n)
 {
 	struct rte_stack_lf_elem *first, *last = NULL;
diff --git a/lib/librte_stack/rte_stack_std.h b/lib/librte_stack/rte_stack_std.h
index 5dc9409..1306ea3 100644
--- a/lib/librte_stack/rte_stack_std.h
+++ b/lib/librte_stack/rte_stack_std.h
@@ -19,7 +19,7 @@
  * @return
  *   Actual number of objects pushed (either 0 or *n*).
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 __rte_stack_std_push(struct rte_stack *s, void * const *obj_table,
 		     unsigned int n)
 {
@@ -58,7 +58,7 @@
  * @return
  *   Actual number of objects popped (either 0 or *n*).
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 __rte_stack_std_pop(struct rte_stack *s, void **obj_table, unsigned int n)
 {
 	struct rte_stack_std *stack = &s->stack_std;
@@ -92,7 +92,7 @@
  * @return
  *   The number of used entries in the stack.
  */
-static __rte_always_inline unsigned int __rte_experimental
+__rte_experimental static __rte_always_inline unsigned int
 __rte_stack_std_count(struct rte_stack *s)
 {
 	return (unsigned int)s->stack_std.len;
diff --git a/lib/librte_table/rte_table_hash_func.h b/lib/librte_table/rte_table_hash_func.h
index 11ea5a9..6c7db1c 100644
--- a/lib/librte_table/rte_table_hash_func.h
+++ b/lib/librte_table/rte_table_hash_func.h
@@ -14,7 +14,7 @@
 #include <rte_compat.h>
 #include <rte_common.h>
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_crc32_u64_generic(uint64_t crc, uint64_t value)
 {
 	int i;
@@ -52,7 +52,7 @@
 
 #endif
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key8(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -65,7 +65,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key16(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -83,7 +83,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key24(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -104,7 +104,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key32(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -129,7 +129,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key40(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -154,7 +154,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key48(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -180,7 +180,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key56(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
@@ -209,7 +209,7 @@
 	return crc0;
 }
 
-static inline uint64_t __rte_experimental
+__rte_experimental static inline uint64_t
 rte_table_hash_crc_key64(void *key, void *mask, __rte_unused uint32_t key_size,
 	uint64_t seed)
 {
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 119db16..0c54ca4 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -31,7 +31,7 @@
  * @return
  *  -EALREADY if Telemetry is already initialised.
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_telemetry_init(void);
 
 /**
@@ -45,7 +45,7 @@
  * @return
  *  -EPERM on failure
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_telemetry_cleanup(void);
 
 /**
@@ -60,7 +60,7 @@
  * @return
  *  -1 on failure when the test has failed
  */
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_telemetry_selftest(void);
 
 #endif
diff --git a/lib/librte_telemetry/rte_telemetry_parser.h b/lib/librte_telemetry/rte_telemetry_parser.h
index b705194..85040b8 100644
--- a/lib/librte_telemetry/rte_telemetry_parser.h
+++ b/lib/librte_telemetry/rte_telemetry_parser.h
@@ -8,7 +8,7 @@
 #ifndef _RTE_TELEMETRY_PARSER_H_
 #define _RTE_TELEMETRY_PARSER_H_
 
-int32_t __rte_experimental
+__rte_experimental int32_t
 rte_telemetry_parse(struct telemetry_impl *telemetry, char *socket_rx_data);
 
 #endif
diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h
index 2196934..39fc1d5 100644
--- a/lib/librte_timer/rte_timer.h
+++ b/lib/librte_timer/rte_timer.h
@@ -147,7 +147,7 @@ struct rte_timer
  *   - 0: Success
  *   - -ENOSPC: maximum number of timer data instances already allocated
  */
-int __rte_experimental rte_timer_data_alloc(uint32_t *id_ptr);
+__rte_experimental int rte_timer_data_alloc(uint32_t *id_ptr);
 
 /**
  * @warning
@@ -162,7 +162,7 @@ struct rte_timer
  *   - 0: Success
  *   - -EINVAL: invalid timer data instance identifier
  */
-int __rte_experimental rte_timer_data_dealloc(uint32_t id);
+__rte_experimental int rte_timer_data_dealloc(uint32_t id);
 
 /**
  * Initialize the timer library.
@@ -187,7 +187,7 @@ struct rte_timer
  *
  * Free timer subsystem resources.
  */
-void __rte_experimental rte_timer_subsystem_finalize(void);
+__rte_experimental void rte_timer_subsystem_finalize(void);
 
 /**
  * Initialize a timer handle.
@@ -408,7 +408,7 @@ int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
  *   - (-1): Timer is in the RUNNING or CONFIG state.
  *   - -EINVAL: invalid timer_data_id
  */
-int __rte_experimental
+__rte_experimental int
 rte_timer_alt_reset(uint32_t timer_data_id, struct rte_timer *tim,
 		    uint64_t ticks, enum rte_timer_type type,
 		    unsigned int tim_lcore, rte_timer_cb_t fct, void *arg);
@@ -433,7 +433,7 @@ int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
  *   - (-1): The timer is in the RUNNING or CONFIG state.
  *   - -EINVAL: invalid timer_data_id
  */
-int __rte_experimental
+__rte_experimental int
 rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim);
 
 /**
@@ -469,7 +469,7 @@ int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
  *   - 0: success
  *   - -EINVAL: invalid timer_data_id
  */
-int __rte_experimental
+__rte_experimental int
 rte_timer_alt_manage(uint32_t timer_data_id, unsigned int *poll_lcores,
 		     int n_poll_lcores, rte_timer_alt_manage_cb_t f);
 
@@ -501,7 +501,7 @@ int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
  *   - 0: success
  *   - EINVAL: invalid timer_data_id
  */
-int __rte_experimental
+__rte_experimental int
 rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
 		   int nb_walk_lcores, rte_timer_stop_all_cb_t f, void *f_arg);
 
@@ -523,7 +523,7 @@ int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
  *   - 0: success
  *   - -EINVAL: invalid timer_data_id
  */
-int __rte_experimental
+__rte_experimental int
 rte_timer_alt_dump_stats(uint32_t timer_data_id, FILE *f);
 
 #ifdef __cplusplus
diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
index 51a9a7b..f3a51a8 100644
--- a/lib/librte_vhost/rte_vdpa.h
+++ b/lib/librte_vhost/rte_vdpa.h
@@ -100,7 +100,7 @@ struct rte_vdpa_device {
  * @return
  *  device id on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
 		struct rte_vdpa_dev_ops *ops);
 
@@ -115,7 +115,7 @@ struct rte_vdpa_device {
  * @return
  *  device id on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vdpa_unregister_device(int did);
 
 /**
@@ -129,7 +129,7 @@ struct rte_vdpa_device {
  * @return
  *  device id on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vdpa_find_device_id(struct rte_vdpa_dev_addr *addr);
 
 /**
@@ -143,7 +143,7 @@ struct rte_vdpa_device {
  * @return
  *  rte_vdpa_device on success, NULL on failure
  */
-struct rte_vdpa_device * __rte_experimental
+__rte_experimental struct rte_vdpa_device *
 rte_vdpa_get_device(int did);
 
 /**
@@ -155,7 +155,7 @@ struct rte_vdpa_device * __rte_experimental
  * @return
  *  available vdpa device number
  */
-int __rte_experimental
+__rte_experimental int
 rte_vdpa_get_device_num(void);
 
 /**
@@ -171,7 +171,7 @@ struct rte_vdpa_device * __rte_experimental
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_host_notifier_ctrl(int vid, bool enable);
 
 /**
@@ -191,6 +191,6 @@ struct rte_vdpa_device * __rte_experimental
  * @return
  *  number of synced used entries on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
 #endif /* _RTE_VDPA_H_ */
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 338e47c..66bdbf4 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -313,7 +313,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_attach_vdpa_device(const char *path, int did);
 
 /**
@@ -324,7 +324,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_detach_vdpa_device(const char *path);
 
 /**
@@ -335,7 +335,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  Device id, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_get_vdpa_device_id(const char *path);
 
 /**
@@ -403,7 +403,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_set_protocol_features(const char *path,
 		uint64_t protocol_features);
 
@@ -417,7 +417,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_get_protocol_features(const char *path,
 		uint64_t *protocol_features);
 
@@ -431,7 +431,7 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num);
 
 /**
@@ -656,7 +656,7 @@ int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_get_log_base(int vid, uint64_t *log_base, uint64_t *log_size);
 
 /**
@@ -673,7 +673,7 @@ int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_get_vring_base(int vid, uint16_t queue_id,
 		uint16_t *last_avail_idx, uint16_t *last_used_idx);
 
@@ -691,7 +691,7 @@ int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_set_vring_base(int vid, uint16_t queue_id,
 		uint16_t last_avail_idx, uint16_t last_used_idx);
 
@@ -707,7 +707,7 @@ int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
  * @return
  *  0 on success, -1 on failure
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_extern_callback_register(int vid,
 		struct rte_vhost_user_extern_ops const * const ops, void *ctx);
 
@@ -719,7 +719,7 @@ int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
  * @return
  *  device id
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_get_vdpa_device_id(int vid);
 
 #ifdef __cplusplus
diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
index d08e0ff..5014295 100644
--- a/lib/librte_vhost/rte_vhost_crypto.h
+++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -35,7 +35,7 @@ enum rte_vhost_crypto_zero_copy {
  *  0 if the Vhost Crypto Instance is created successfully.
  *  Negative integer if otherwise
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_crypto_create(int vid, uint8_t cryptodev_id,
 		struct rte_mempool *sess_pool,
 		struct rte_mempool *sess_priv_pool,
@@ -50,7 +50,7 @@ enum rte_vhost_crypto_zero_copy {
  *  0 if the Vhost Crypto Instance is created successfully.
  *  Negative integer if otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_crypto_free(int vid);
 
 /**
@@ -64,7 +64,7 @@ enum rte_vhost_crypto_zero_copy {
  *  0 if completed successfully.
  *  Negative integer if otherwise.
  */
-int __rte_experimental
+__rte_experimental int
 rte_vhost_crypto_set_zero_copy(int vid, enum rte_vhost_crypto_zero_copy option);
 
 /**
@@ -84,7 +84,7 @@ enum rte_vhost_crypto_zero_copy {
  * @return
  *  The number of fetched and processed vhost crypto request operations.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
 		struct rte_crypto_op **ops, uint16_t nb_ops);
 /**
@@ -105,7 +105,7 @@ enum rte_vhost_crypto_zero_copy {
  * @return
  *  The number of ops processed.
  */
-uint16_t __rte_experimental
+__rte_experimental uint16_t
 rte_vhost_crypto_finalize_requests(struct rte_crypto_op **ops,
 		uint16_t nb_ops, int *callfds, uint16_t *nb_callfds);
 
-- 
1.8.3.1



More information about the dev mailing list