Skip to contentSkip to conversation

eal: promote some service core functions to stable

PATCH Superseded Gage Eads 5 participants 17 messages Jun 20, 2019 – Jul 8, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Gage Eads

author
#0 lore raw

PATCH 1/1 eal: promote some service core functions to stable

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and this commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -1
index 30d221647..985012219 100644
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true
 sources = files('sw_evdev_scheduler.c',
 	'sw_evdev_selftest.c',
 	'sw_evdev_worker.c',
lib/librte_eal/common/include/rte_service.h +3 -12
index bf25aec35..d8701dd4c 100644
@@ -162,9 +162,6 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate);
 int32_t rte_service_runstate_get(uint32_t id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
- *
  * This function returns whether the service may be currently executing on
  * at least one lcore, or definitely is not. This function can be used to
  * determine if, after setting the service runstate to stopped, the service
@@ -178,7 +175,7 @@ int32_t rte_service_runstate_get(uint32_t id);
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -389,9 +386,6 @@ int32_t rte_service_attr_reset_all(uint32_t id);
 #define RTE_SERVICE_LCORE_ATTR_LOOPS 0
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Get an attribute from a service core.
  *
  * @param lcore Id of the service core.
@@ -401,14 +395,11 @@ int32_t rte_service_attr_reset_all(uint32_t id);
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Reset all attribute values of a service core.
  *
  * @param lcore The service core to reset all the statistics of
@@ -416,7 +407,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 
 #ifdef __cplusplus
lib/librte_eal/common/rte_service.c +3 -3
index 5f75e5a53..c3653ebae 100644
@@ -378,7 +378,7 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id)
 {
 	uint32_t ids[RTE_MAX_LCORE] = {0};
@@ -754,7 +754,7 @@ rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value)
 	}
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value)
 {
@@ -814,7 +814,7 @@ rte_service_attr_reset_all(uint32_t id)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore)
 {
 	struct core_state *cs;
lib/librte_eal/rte_eal_version.map +3 -3
index 824edf0ff..fc26b9503 100644
@@ -292,6 +292,9 @@ DPDK_19.08 {
 
 	rte_lcore_index;
 	rte_lcore_to_socket_id;
+	rte_service_lcore_attr_get;
+	rte_service_lcore_attr_reset_all;
+	rte_service_may_be_active;
 
 } DPDK_19.05;
 
@@ -383,9 +386,6 @@ EXPERIMENTAL {
 	rte_mp_sendmsg;
 	rte_option_register;
 	rte_realloc_socket;
-	rte_service_lcore_attr_get;
-	rte_service_lcore_attr_reset_all;
-	rte_service_may_be_active;
 
 	# added in 19.08
 	rte_lcore_cpuset;
lib/librte_eventdev/Makefile +0 -1
index 53079f4c2..fdaec7d06 100644
@@ -11,7 +11,6 @@ LIB = librte_eventdev.a
 LIBABIVER := 6
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUX),y)
lib/librte_eventdev/meson.build +0 -1
index 6cfe60e1f..f623d74f8 100644
@@ -2,7 +2,6 @@
 # Copyright(c) 2017 Intel Corporation
 
 version = 6
-allow_experimental_apis = true
 
 if is_linux
 	cflags += '-DLINUX'
Signature · 1 line
2.13.6
#1 lore raw
Quoted 35 lines · Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and this commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -0
index 30d221647..985012219 100644

drivers/event/sw/meson.build line 4

Quoted 4 lines
drivers/event/sw/meson.build +0 -1
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

Quoted 140 lines
drivers/event/sw/meson.build +0 -0
 sources = files('sw_evdev_scheduler.c',
 	'sw_evdev_selftest.c',
 	'sw_evdev_worker.c',
lib/librte_eal/common/include/rte_service.h +3 -12
index bf25aec35..d8701dd4c 100644
@@ -162,9 +162,6 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate);
 int32_t rte_service_runstate_get(uint32_t id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
- *
  * This function returns whether the service may be currently executing on
  * at least one lcore, or definitely is not. This function can be used to
  * determine if, after setting the service runstate to stopped, the service
@@ -178,7 +175,7 @@ int32_t rte_service_runstate_get(uint32_t id);
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -389,9 +386,6 @@ int32_t rte_service_attr_reset_all(uint32_t id);
 #define RTE_SERVICE_LCORE_ATTR_LOOPS 0
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Get an attribute from a service core.
  *
  * @param lcore Id of the service core.
@@ -401,14 +395,11 @@ int32_t rte_service_attr_reset_all(uint32_t id);
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Reset all attribute values of a service core.
  *
  * @param lcore The service core to reset all the statistics of
@@ -416,7 +407,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 
 #ifdef __cplusplus
lib/librte_eal/common/rte_service.c +3 -3
index 5f75e5a53..c3653ebae 100644
@@ -378,7 +378,7 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id)
 {
 	uint32_t ids[RTE_MAX_LCORE] = {0};
@@ -754,7 +754,7 @@ rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value)
 	}
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value)
 {
@@ -814,7 +814,7 @@ rte_service_attr_reset_all(uint32_t id)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore)
 {
 	struct core_state *cs;
lib/librte_eal/rte_eal_version.map +3 -3
index 824edf0ff..fc26b9503 100644
@@ -292,6 +292,9 @@ DPDK_19.08 {
 
 	rte_lcore_index;
 	rte_lcore_to_socket_id;
+	rte_service_lcore_attr_get;
+	rte_service_lcore_attr_reset_all;
+	rte_service_may_be_active;
 
 } DPDK_19.05;
 
@@ -383,9 +386,6 @@ EXPERIMENTAL {
 	rte_mp_sendmsg;
 	rte_option_register;
 	rte_realloc_socket;
-	rte_service_lcore_attr_get;
-	rte_service_lcore_attr_reset_all;
-	rte_service_may_be_active;
 
 	# added in 19.08
 	rte_lcore_cpuset;
lib/librte_eventdev/Makefile +0 -1
index 53079f4c2..fdaec7d06 100644
@@ -11,7 +11,6 @@ LIB = librte_eventdev.a
 LIBABIVER := 6
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUX),y)
lib/librte_eventdev/meson.build +0 -1
index 6cfe60e1f..f623d74f8 100644
@@ -2,7 +2,6 @@
 # Copyright(c) 2017 Intel Corporation
 
 version = 6
-allow_experimental_apis = true
 
 if is_linux
 	cflags += '-DLINUX'
author
#2 lore raw
Quoted 47 lines
Quoted 3 lines · Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-

experimental for the 19.08 release.

Quoted 35 lines

rte_service_may_be_active() is used by eventdev and the sw PMD, and this commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -0
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk  LIB =

librte_pmd_sw_event.a

 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using diff
--git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build
index 30d221647..985012219 100644
drivers/event/sw/meson.build +0 -0
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Intel

Corporation

Quoted 1 line

-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Quoted 9 lines

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

You're right, eventdev still uses that experimental API (which this patch is unrelated to). I tested this change with GCC (5.4.0) and it built without errors, which I took to mean no more experimental APIs were in use. That's concerning that GCC didn't catch it.

At any rate, I'll correct this in v2.

Thanks,
Gage

#3 lore raw
In reply to Aaron Conole
Quoted 52 lines · Aaron Conole
Quoted 2 lines · Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in

DPDK

Quoted 33 lines

18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and this commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -0
index 30d221647..985012219 100644

drivers/event/sw/meson.build line 4

Quoted 4 lines
drivers/event/sw/meson.build +0 -1
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

Quoted 5 lines

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

Erf, it looks like the __rte_experimental tag is affected by the order in the declaration of the symbol.

lib/librte_cryptodev/rte_cryptodev.h +1 -1
@@ -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);

With this, I get the proper warning...

Signature · 1 line
David Marchand
#4 lore raw
Quoted 76 lines · David Marchand
Quoted 52 lines · Aaron Conole
Quoted 2 lines · Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in

DPDK

Quoted 33 lines

18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and this commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -0
index 30d221647..985012219 100644

drivers/event/sw/meson.build line 4

Quoted 4 lines
drivers/event/sw/meson.build +0 -1
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

Quoted 5 lines

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

Erf, it looks like the __rte_experimental tag is affected by the order in the declaration of the symbol.

lib/librte_cryptodev/rte_cryptodev.h +0 -0
@@ -1245,7 +1245,7 @@ struct rte_cryptodev_asym_session *

__rte_experimental
* - On success return pointer to user data.
* - On failure returns NULL.
*/

lib/librte_cryptodev/rte_cryptodev.h +1 -1
-void * __rte_experimental
+__rte_experimental void *
 rte_cryptodev_sym_session_get_user_data(
                                        struct rte_cryptodev_sym_session
Quoted 3 lines

*sess);

https://hastebin.com/micomogoqi.cs

Does it mean that the "void *" type had been marked as deprecated with the previous syntax?
Requesting compiler experts assistance :-)

Signature · 1 line
David Marchand
#5 lore raw
Quoted 89 lines · David Marchand
Quoted 79 lines · David Marchand
Quoted 55 lines · Aaron Conole
Quoted 1 line · Gage Eads

The functions rte_service_may_be_active(),

rte_service_lcore_attr_get(),

Quoted 1 line

and rte_service_attr_reset_all() were introduced nearly a year ago in

DPDK

Quoted 3 lines

18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and

this

Review

Quoted 26 lines

commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
(quoted diff) +0 -0

b/drivers/event/sw/meson.build

drivers/event/sw/meson.build line 4

Quoted 8 lines

index 30d221647..985012219 100644

drivers/event/sw/meson.build +0 -1
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

Quoted 5 lines

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

Erf, it looks like the __rte_experimental tag is affected by the order in the declaration of the symbol.

lib/librte_cryptodev/rte_cryptodev.h +0 -0
@@ -1245,7 +1245,7 @@ struct rte_cryptodev_asym_session *

__rte_experimental
* - On success return pointer to user data.
* - On failure returns NULL.
*/

lib/librte_cryptodev/rte_cryptodev.h +1 -1
-void * __rte_experimental
+__rte_experimental void *
 rte_cryptodev_sym_session_get_user_data(
                                        struct rte_cryptodev_sym_session
Quoted 3 lines

*sess);

https://hastebin.com/micomogoqi.cs

Quoted 4 lines

Does it mean that the "void *" type had been marked as deprecated with the previous syntax?
Requesting compiler experts assistance :-)

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would be to enforce that __rte_experimental is the first thing of a symbol declaration.

Comments?

1: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html

Signature · 1 line
David Marchand
#6 lore raw
Quoted 98 lines · David Marchand
Quoted 89 lines · David Marchand
Quoted 79 lines · David Marchand
Quoted 55 lines · Aaron Conole
Quoted 1 line · Gage Eads

The functions rte_service_may_be_active(),

rte_service_lcore_attr_get(),

Quoted 1 line

and rte_service_attr_reset_all() were introduced nearly a year ago in

DPDK

Quoted 3 lines

18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by eventdev and the sw PMD, and

this

Review

Quoted 26 lines

commit allows them to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 lib/librte_eventdev/Makefile                |  1 -
 lib/librte_eventdev/meson.build             |  1 -
 7 files changed, 9 insertions(+), 22 deletions(-)
drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
(quoted diff) +0 -0

b/drivers/event/sw/meson.build

drivers/event/sw/meson.build line 4

Quoted 8 lines

index 30d221647..985012219 100644

drivers/event/sw/meson.build +0 -1
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true

I don't think you can remove these. There are still some experimental APIs (f.e. the rename for rte_cryptodev_sym_session_get_private_data marked that function as experimental and it will cause build breakage).

Maybe I'm mis understanding it? It would be good to get verification from Bruce whether that API should not be marked as experimental (it was just a rename, so not sure...) - maybe that's a follow up for this patch?

Quoted 5 lines

See: https://travis-ci.com/ovsrobot/dpdk/jobs/209722145 for an example

The odd thing is I only see it on the clang builds - perhaps it's a missing definition for the clang compiler.

Erf, it looks like the __rte_experimental tag is affected by the order in the declaration of the symbol.

lib/librte_cryptodev/rte_cryptodev.h +0 -0
@@ -1245,7 +1245,7 @@ struct rte_cryptodev_asym_session *

__rte_experimental
* - On success return pointer to user data.
* - On failure returns NULL.
*/

lib/librte_cryptodev/rte_cryptodev.h +1 -1
-void * __rte_experimental
+__rte_experimental void *
 rte_cryptodev_sym_session_get_user_data(
                                        struct rte_cryptodev_sym_session
Quoted 3 lines

*sess);

https://hastebin.com/micomogoqi.cs

Quoted 4 lines

Does it mean that the "void *" type had been marked as deprecated with the previous syntax?
Requesting compiler experts assistance :-)

Quoted 7 lines

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would be to enforce that __rte_experimental is the first thing of a symbol declaration.

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't throw an error about expecting an asm statement if you put it anywhere else

Neil

Quoted 5 lines

1: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html

Signature · 1 line
David Marchand
#7 lore raw
Quoted 5 lines · Neil Horman
Quoted 4 lines · David Marchand

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would be to enforce that __rte_experimental is the first thing of a symbol

Quoted 8 lines

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't throw an error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without getting warnings.
If I try to compile some sources which includes rte_mbuf.h but without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this inline is not called.

For now, I hid all those inlines under the ALLOW_EXPERIMENTAL_API flag.

- I have accumulated other fixes and I dropped all the marking in the .c files.
This ended up with a huge series...

 118 files changed, 867 insertions(+), 646 deletions(-)

https://github.com/david-marchand/dpdk/commits/experimental

I will let the week end pass on this.

Signature · 1 line
David Marchand
#8 lore raw
Quoted 19 lines · David Marchand
Quoted 5 lines · Neil Horman
Quoted 4 lines · David Marchand

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would be to enforce that __rte_experimental is the first thing of a symbol

Quoted 8 lines

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't throw an error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

Quoted 8 lines

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without getting warnings.

Right, thats the way its supposed to work on gcc/icc/clang. function attributes must be declared between the return type and the function name, anything else will generate compiler warnings/errors. Because __rte_experimental expands to a __attribute__(...), you have to place it there.

Quoted 5 lines

If I try to compile some sources which includes rte_mbuf.h but without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this inline is not called.

Thats...odd. I wonder if thats an artifact of the function being marked as inline. The compiler is supposed to insert the warning for any remaining calls after dead code eliminitaion. If the function is inline, I wonder if the compiler conservatively inserts the warning because it got expanded into another function, when it can't tell if it will be entirely elimintated. Can you provide a code sample that demonstrates this?

Quoted 16 lines

For now, I hid all those inlines under the ALLOW_EXPERIMENTAL_API flag.

- I have accumulated other fixes and I dropped all the marking in the .c files.
This ended up with a huge series...

 118 files changed, 867 insertions(+), 646 deletions(-)

https://github.com/david-marchand/dpdk/commits/experimental

I will let the week end pass on this.

Signature · 1 line
David Marchand
#9 lore raw
Quoted 45 lines · Neil Horman
Quoted 1 line · David Marchand

On Fri, Jun 21, 2019 at 6:28 PM Neil Horman <[email protected]>

Quoted 5 lines · wrote:
Quoted 5 lines · David Marchand
Quoted 3 lines

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would

be to

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

enforce that __rte_experimental is the first thing of a symbol

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't

throw an

Quoted 7 lines
Quoted 3 lines

error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

Quoted 8 lines

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without getting warnings.

Right, thats the way its supposed to work on gcc/icc/clang. function attributes
must be declared between the return type and the function name, anything else
will generate compiler warnings/errors. Because __rte_experimental expands to a
__attribute__(...), you have to place it there.

Quoted 3 lines

If I try to compile some sources which includes rte_mbuf.h but without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this inline

is

Quoted 2 lines

not called.

Quoted 10 lines

Thats...odd. I wonder if thats an artifact of the function being marked as inline. The compiler is supposed to insert the warning for any remaining calls
after dead code eliminitaion. If the function is inline, I wonder if the compiler conservatively inserts the warning because it got expanded into another
function, when it can't tell if it will be entirely elimintated. Can you provide a code sample that demonstrates this?

rte_mbuf_buf_addr() is called in rte_mbuf_data_addr_default(), both of them are unused by the includers of rte_mbuf.h.

Reproduced it like this:

[dmarchan@dmarchan ~]$ cat deprecated.c __attribute__((deprecated)) static inline void *plap(void) {
return 0;
}

__attribute__((deprecated)) static inline void *plep(void) {
plap();
return 0;
}

int main(int argc, char *argv[])
{
return 0;
}
[dmarchan@dmarchan ~]$ gcc -o deprecated -Wall deprecated.c deprecated.c: In function ‘plep’:
deprecated.c:8:2: warning: ‘plap’ is deprecated (declared at deprecated.c:1) [-Wdeprecated-declarations]
plap();
^

Signature · 1 line
David Marchand
#10 lore raw
Quoted 75 lines · David Marchand
Quoted 45 lines · Neil Horman
Quoted 1 line · David Marchand

On Fri, Jun 21, 2019 at 6:28 PM Neil Horman <[email protected]>

Quoted 5 lines · wrote:
Quoted 5 lines · David Marchand
Quoted 3 lines

Ok, did a new pass on the tree.. found quite some sites where we have issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach would

be to

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

enforce that __rte_experimental is the first thing of a symbol

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't

throw an

Quoted 7 lines
Quoted 3 lines

error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

Quoted 8 lines

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without getting warnings.

Right, thats the way its supposed to work on gcc/icc/clang. function attributes
must be declared between the return type and the function name, anything else
will generate compiler warnings/errors. Because __rte_experimental expands to a
__attribute__(...), you have to place it there.

Quoted 3 lines

If I try to compile some sources which includes rte_mbuf.h but without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this inline

is

Quoted 2 lines

not called.

Quoted 10 lines

Thats...odd. I wonder if thats an artifact of the function being marked as inline. The compiler is supposed to insert the warning for any remaining calls
after dead code eliminitaion. If the function is inline, I wonder if the compiler conservatively inserts the warning because it got expanded into another
function, when it can't tell if it will be entirely elimintated. Can you provide a code sample that demonstrates this?

rte_mbuf_buf_addr() is called in rte_mbuf_data_addr_default(), both of them are unused by the includers of rte_mbuf.h.

Reproduced it like this:

[dmarchan@dmarchan ~]$ cat deprecated.c __attribute__((deprecated)) static inline void *plap(void) {
return 0;
}

__attribute__((deprecated)) static inline void *plep(void) {
plap();
return 0;
}

Quoted 11 lines

int main(int argc, char *argv[])
{
return 0;
}
[dmarchan@dmarchan ~]$ gcc -o deprecated -Wall deprecated.c deprecated.c: In function ‘plep’:
deprecated.c:8:2: warning: ‘plap’ is deprecated (declared at deprecated.c:1) [-Wdeprecated-declarations]
plap();
^

Hmm, yes, that seems buggy to me. I wonder if you are seeing this bug in action:

https://gcc.gnu.org/bugzilla//show_bug.cgi?id=80680

Seem like the behavior fits. It would be interesting to know if clang and icc suffer from the same issue

Neil

Quoted 2 lines
Signature · 1 line
David Marchand
#11 lore raw
Quoted 100 lines · Neil Horman
Quoted 1 line · David Marchand

On Fri, Jun 21, 2019 at 7:41 PM Neil Horman <[email protected]>

Quoted 7 lines · wrote:
Quoted 7 lines · David Marchand
Quoted 1 line

On Fri, Jun 21, 2019 at 6:28 PM Neil Horman <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · David Marchand
Quoted 1 line

Ok, did a new pass on the tree.. found quite some sites where we

have

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach

would

Quoted 15 lines
Quoted 15 lines

be to

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

enforce that __rte_experimental is the first thing of a symbol

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't

throw an

Quoted 7 lines
Quoted 3 lines

error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without

getting

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

warnings.

Right, thats the way its supposed to work on gcc/icc/clang. function attributes
must be declared between the return type and the function name,

anything

Quoted 6 lines
Quoted 6 lines

else
will generate compiler warnings/errors. Because __rte_experimental expands to a
__attribute__(...), you have to place it there.

Quoted 1 line

If I try to compile some sources which includes rte_mbuf.h but

without

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

-DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this

inline

Quoted 4 lines
Quoted 4 lines

is

Quoted 2 lines

not called.

Thats...odd. I wonder if thats an artifact of the function being

marked as

Quoted 1 line
Quoted 1 line

inline. The compiler is supposed to insert the warning for any

remaining

Quoted 2 lines
Quoted 2 lines

calls
after dead code eliminitaion. If the function is inline, I wonder if

the

Quoted 1 line
Quoted 1 line

compiler conservatively inserts the warning because it got expanded

into

Quoted 2 lines
Quoted 2 lines

another
function, when it can't tell if it will be entirely elimintated. Can

you

Quoted 4 lines
Quoted 3 lines

provide a code sample that demonstrates this?

rte_mbuf_buf_addr() is called in rte_mbuf_data_addr_default(), both of

them

Quoted 17 lines

are unused by the includers of rte_mbuf.h.

Reproduced it like this:

[dmarchan@dmarchan ~]$ cat deprecated.c __attribute__((deprecated)) static inline void *plap(void) {
return 0;
}

__attribute__((deprecated)) static inline void *plep(void) {
plap();
return 0;
}

Quoted 11 lines

int main(int argc, char *argv[])
{
return 0;
}
[dmarchan@dmarchan ~]$ gcc -o deprecated -Wall deprecated.c deprecated.c: In function ‘plep’:
deprecated.c:8:2: warning: ‘plap’ is deprecated (declared at deprecated.c:1) [-Wdeprecated-declarations]
plap();
^

Quoted 4 lines

Hmm, yes, that seems buggy to me. I wonder if you are seeing this bug in action:

https://gcc.gnu.org/bugzilla//show_bug.cgi?id=80680

It has the same flavor yes.
Currently using gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

Quoted 5 lines

Seem like the behavior fits. It would be interesting to know if clang and icc
suffer from the same issue

Just tried, clang is fine.
clang version 3.4.2 (tags/RELEASE_34/dot2-final)

Actually, I went and protected this call to rte_mbuf_buf_addr(). And with just this, it builds fine.
I think I am going to take this approach, just a little comment :-).

Signature · 1 line
David Marchand
#12 lore raw
Quoted 119 lines · David Marchand
Quoted 100 lines · Neil Horman
Quoted 1 line · David Marchand

On Fri, Jun 21, 2019 at 7:41 PM Neil Horman <[email protected]>

Quoted 7 lines · wrote:
Quoted 7 lines · David Marchand
Quoted 1 line

On Fri, Jun 21, 2019 at 6:28 PM Neil Horman <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · David Marchand
Quoted 1 line

Ok, did a new pass on the tree.. found quite some sites where we

have

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

issues (and other discrepancies... I started a new patchset). Looked at gcc documentation [1], and to me the safer approach

would

Quoted 15 lines
Quoted 15 lines

be to

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

enforce that __rte_experimental is the first thing of a symbol

declaration.

Quoted 3 lines

Comments?

Yes, thats the only way it works, in fact I'm suprised gcc didn't

throw an

Quoted 7 lines
Quoted 3 lines

error
about expecting an asm statement if you put it anywhere else

- I tried this, but then I hit issues with inlines. Like for example:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

static inline char * __rte_experimental rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp) {
return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
}

I did not find a way to move the __rte_experimental tag without

getting

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

warnings.

Right, thats the way its supposed to work on gcc/icc/clang. function attributes
must be declared between the return type and the function name,

anything

Quoted 6 lines
Quoted 6 lines

else
will generate compiler warnings/errors. Because __rte_experimental expands to a
__attribute__(...), you have to place it there.

Quoted 1 line

If I try to compile some sources which includes rte_mbuf.h but

without

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

-DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining that rte_mbuf_buf_addr() is deprecated, even if this

inline

Quoted 4 lines
Quoted 4 lines

is

Quoted 2 lines

not called.

Thats...odd. I wonder if thats an artifact of the function being

marked as

Quoted 1 line
Quoted 1 line

inline. The compiler is supposed to insert the warning for any

remaining

Quoted 2 lines
Quoted 2 lines

calls
after dead code eliminitaion. If the function is inline, I wonder if

the

Quoted 1 line
Quoted 1 line

compiler conservatively inserts the warning because it got expanded

into

Quoted 2 lines
Quoted 2 lines

another
function, when it can't tell if it will be entirely elimintated. Can

you

Quoted 4 lines
Quoted 3 lines

provide a code sample that demonstrates this?

rte_mbuf_buf_addr() is called in rte_mbuf_data_addr_default(), both of

them

Quoted 17 lines

are unused by the includers of rte_mbuf.h.

Reproduced it like this:

[dmarchan@dmarchan ~]$ cat deprecated.c __attribute__((deprecated)) static inline void *plap(void) {
return 0;
}

__attribute__((deprecated)) static inline void *plep(void) {
plap();
return 0;
}

Quoted 11 lines

int main(int argc, char *argv[])
{
return 0;
}
[dmarchan@dmarchan ~]$ gcc -o deprecated -Wall deprecated.c deprecated.c: In function ‘plep’:
deprecated.c:8:2: warning: ‘plap’ is deprecated (declared at deprecated.c:1) [-Wdeprecated-declarations]
plap();
^

Quoted 4 lines

Hmm, yes, that seems buggy to me. I wonder if you are seeing this bug in action:

https://gcc.gnu.org/bugzilla//show_bug.cgi?id=80680

It has the same flavor yes.
Currently using gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

Quoted 5 lines

Seem like the behavior fits. It would be interesting to know if clang and icc
suffer from the same issue

Quoted 8 lines

Just tried, clang is fine.
clang version 3.4.2 (tags/RELEASE_34/dot2-final)

Actually, I went and protected this call to rte_mbuf_buf_addr(). And with just this, it builds fine.
I think I am going to take this approach, just a little comment :-).

Thats probably the best workaround for this at the moment, I agree. I'll add a comment to the gcc bug and see if we can't get some movement on it

thanks
Neil

Quoted 3 lines
Signature · 2 lines
-- 
David Marchand
author
#13 lore raw

PATCH v2 1/1 eal: promote some service core functions to stable

In reply to Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by the sw PMD, and this commit allows it to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 5 files changed, 9 insertions(+), 20 deletions(-)

v2: add allow-experimental flag back to eventdev, which still uses an
experimental cryptodev API

drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -1
index 30d221647..985012219 100644
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true
 sources = files('sw_evdev_scheduler.c',
 	'sw_evdev_selftest.c',
 	'sw_evdev_worker.c',
lib/librte_eal/common/include/rte_service.h +3 -12
index bf25aec35..d8701dd4c 100644
@@ -162,9 +162,6 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate);
 int32_t rte_service_runstate_get(uint32_t id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
- *
  * This function returns whether the service may be currently executing on
  * at least one lcore, or definitely is not. This function can be used to
  * determine if, after setting the service runstate to stopped, the service
@@ -178,7 +175,7 @@ int32_t rte_service_runstate_get(uint32_t id);
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -389,9 +386,6 @@ int32_t rte_service_attr_reset_all(uint32_t id);
 #define RTE_SERVICE_LCORE_ATTR_LOOPS 0
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Get an attribute from a service core.
  *
  * @param lcore Id of the service core.
@@ -401,14 +395,11 @@ int32_t rte_service_attr_reset_all(uint32_t id);
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Reset all attribute values of a service core.
  *
  * @param lcore The service core to reset all the statistics of
@@ -416,7 +407,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 
 #ifdef __cplusplus
lib/librte_eal/common/rte_service.c +3 -3
index 5f75e5a53..c3653ebae 100644
@@ -378,7 +378,7 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id)
 {
 	uint32_t ids[RTE_MAX_LCORE] = {0};
@@ -754,7 +754,7 @@ rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value)
 	}
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 			   uint64_t *attr_value)
 {
@@ -814,7 +814,7 @@ rte_service_attr_reset_all(uint32_t id)
 	return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore)
 {
 	struct core_state *cs;
lib/librte_eal/rte_eal_version.map +3 -3
index 824edf0ff..fc26b9503 100644
@@ -292,6 +292,9 @@ DPDK_19.08 {
 
 	rte_lcore_index;
 	rte_lcore_to_socket_id;
+	rte_service_lcore_attr_get;
+	rte_service_lcore_attr_reset_all;
+	rte_service_may_be_active;
 
 } DPDK_19.05;
 
@@ -383,9 +386,6 @@ EXPERIMENTAL {
 	rte_mp_sendmsg;
 	rte_option_register;
 	rte_realloc_socket;
-	rte_service_lcore_attr_get;
-	rte_service_lcore_attr_reset_all;
-	rte_service_may_be_active;
 
 	# added in 19.08
 	rte_lcore_cpuset;
Signature · 1 line
2.13.6
#14 lore raw
Quoted 97 lines · Gage Eads

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by the sw PMD, and this commit allows it to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 5 files changed, 9 insertions(+), 20 deletions(-)

v2: add allow-experimental flag back to eventdev, which still uses an
experimental cryptodev API

drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -1
index 30d221647..985012219 100644
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true
 sources = files('sw_evdev_scheduler.c',
        'sw_evdev_selftest.c',
        'sw_evdev_worker.c',
lib/librte_eal/common/include/rte_service.h +0 -2
index bf25aec35..d8701dd4c 100644
@@ -162,9 +162,6 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t
 runstate);
 int32_t rte_service_runstate_get(uint32_t id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change, or be removed, without prior

notice
- *
* This function returns whether the service may be currently executing on
* at least one lcore, or definitely is not. This function can be used to
* determine if, after setting the service runstate to stopped, the
service

lib/librte_eal/common/include/rte_service.h +2 -8
@@ -178,7 +175,7 @@ int32_t rte_service_runstate_get(uint32_t id);
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -389,9 +386,6 @@ int32_t rte_service_attr_reset_all(uint32_t id);
 #define RTE_SERVICE_LCORE_ATTR_LOOPS 0
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Get an attribute from a service core.
  *
  * @param lcore Id of the service core.
@@ -401,14 +395,11 @@ int32_t rte_service_attr_reset_all(uint32_t id);
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
                           uint64_t *attr_value);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Reset all attribute values of a service core.
  *
  * @param lcore The service core to reset all the statistics of

lib/librte_eal/common/include/rte_service.h rte_service_lcore_attr_get(uint32_t lcore, uint32_t · line 413

Quoted 8 lines
lib/librte_eal/common/include/rte_service.h +1 -1
@@ -416,7 +407,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t
 attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 

It seems we want to return errors via the return code. Error codes from errno.h are int so we are fine with int only.

What is the reason why this is returning a int32_t ?

Quoted 63 lines

#ifdef __cplusplus

lib/librte_eal/common/rte_service.c +1 -1
index 5f75e5a53..c3653ebae 100644
@@ -378,7 +378,7 @@ service_run(uint32_t i, int lcore, struct core_state
 *cs, uint64_t service_mask)
        return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id)
 {
        uint32_t ids[RTE_MAX_LCORE] = {0};
lib/librte_eal/common/rte_service.c +1 -1
@@ -754,7 +754,7 @@ rte_service_attr_get(uint32_t id, uint32_t attr_id,
 uint64_t *attr_value)
        }
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
                           uint64_t *attr_value)

{

lib/librte_eal/common/rte_service.c +1 -1
@@ -814,7 +814,7 @@ rte_service_attr_reset_all(uint32_t id)
        return 0;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore)
 {
        struct core_state *cs;
lib/librte_eal/rte_eal_version.map +3 -4
index 824edf0ff..fc26b9503 100644
@@ -292,6 +292,9 @@ DPDK_19.08 {
 
        rte_lcore_index;
        rte_lcore_to_socket_id;
+       rte_service_lcore_attr_get;
+       rte_service_lcore_attr_reset_all;
+       rte_service_may_be_active;
 
 } DPDK_19.05;
 
@@ -383,9 +386,6 @@ EXPERIMENTAL {
        rte_mp_sendmsg;
        rte_option_register;
        rte_realloc_socket;
-       rte_service_lcore_attr_get;
-       rte_service_lcore_attr_reset_all;
-       rte_service_may_be_active;
 
        # added in 19.08
        rte_lcore_cpuset;
--

2.13.6

Signature · 1 line
David Marchand
author
#15 lore raw

On Thu, Jun 20, 2019 at 9:03 PM Gage Eads <[email protected]<mailto:[email protected]>> wrote:
The functions rte_service_may_be_active(), rte_service_lcore_attr_get(),
and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK
18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by the sw PMD, and this commit allows it to not need any experimental API.

---
 drivers/event/sw/Makefile                   |  1 -
 drivers/event/sw/meson.build                |  1 -
 lib/librte_eal/common/include/rte_service.h | 15 +++------------
 lib/librte_eal/common/rte_service.c         |  6 +++---
 lib/librte_eal/rte_eal_version.map          |  6 +++---
 5 files changed, 9 insertions(+), 20 deletions(-)

v2: add allow-experimental flag back to eventdev, which still uses an
experimental cryptodev API

drivers/event/sw/Makefile +0 -1
index 81236a392..c6600e836 100644
@@ -7,7 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk<http://rte.vars.mk>
 LIB = librte_pmd_sw_event.a
 
 # build flags
-CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
drivers/event/sw/meson.build +0 -1
index 30d221647..985012219 100644
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-allow_experimental_apis = true
 sources = files('sw_evdev_scheduler.c',
        'sw_evdev_selftest.c',
        'sw_evdev_worker.c',
lib/librte_eal/common/include/rte_service.h +3 -12
index bf25aec35..d8701dd4c 100644
@@ -162,9 +162,6 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate);
 int32_t rte_service_runstate_get(uint32_t id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
- *
  * This function returns whether the service may be currently executing on
  * at least one lcore, or definitely is not. This function can be used to
  * determine if, after setting the service runstate to stopped, the service
@@ -178,7 +175,7 @@ int32_t rte_service_runstate_get(uint32_t id);
  * @retval 0 Service is not running on any lcore
  * @retval -EINVAL Invalid service id
  */
-int32_t __rte_experimental
+int32_t
 rte_service_may_be_active(uint32_t id);
 
 /**
@@ -389,9 +386,6 @@ int32_t rte_service_attr_reset_all(uint32_t id);
 #define RTE_SERVICE_LCORE_ATTR_LOOPS 0
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Get an attribute from a service core.
  *
  * @param lcore Id of the service core.
@@ -401,14 +395,11 @@ int32_t rte_service_attr_reset_all(uint32_t id);
  *         -EINVAL Invalid lcore, attr_id or attr_value was NULL.
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
                           uint64_t *attr_value);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Reset all attribute values of a service core.
  *
  * @param lcore The service core to reset all the statistics of
@@ -416,7 +407,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
  *         -EINVAL Invalid service id provided
  *         -ENOTSUP lcore is not a service core.
  */
-int32_t __rte_experimental
+int32_t
 rte_service_lcore_attr_reset_all(uint32_t lcore);
 

It seems we want to return errors via the return code. Error codes from errno.h are int so we are fine with int only.

What is the reason why this is returning a int32_t ?

Simply to match the other (non-experimental) rte_service_* functions that return int32_t.

#16 lore raw
In reply to Gage Eads

20/06/2019 21:02, Gage Eads:

Quoted 8 lines

The functions rte_service_may_be_active(), rte_service_lcore_attr_get(), and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK 18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by the sw PMD, and this commit allows it to not need any experimental API.

Applied, thanks