eal: promote some service core functions to stable
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
Quoted 35 lines · Gage Eads
The functions
rte_service_may_be_active(),rte_service_lcore_attr_get(), andrte_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.Signed-off-by Gage Eads <[email protected]>--- 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@@ -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 usingdrivers/event/sw/meson.build +0
-0
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
-0sources = files('sw_evdev_scheduler.c', 'sw_evdev_selftest.c', 'sw_evdev_worker.c',lib/librte_eal/common/include/rte_service.h +3
-12@@ -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 __cpluspluslib/librte_eal/common/rte_service.c +3
-3@@ -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@@ -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@@ -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@@ -2,7 +2,6 @@ # Copyright(c) 2017 Intel Corporation version = 6 -allow_experimental_apis = true if is_linux cflags += '-DLINUX'
Quoted 47 lines
Quoted 3 lines · Gage Eads
The functions
rte_service_may_be_active(),rte_service_lcore_attr_get(), andrte_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.Signed-off-by Gage Eads <[email protected]>--- 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@@ -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 100644drivers/event/sw/meson.build +0
-0@@ -1,7 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 IntelCorporation
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_datamarked 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
Quoted 52 lines · Aaron Conole
Quoted 2 lines · Gage Eads
The functions
rte_service_may_be_active(),rte_service_lcore_attr_get(), andrte_service_attr_reset_all()were introduced nearly a year ago inDPDK
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.Signed-off-by Gage Eads <[email protected]>--- 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@@ -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 usingdrivers/event/sw/meson.build +0
-0drivers/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 = trueI don't think you can remove these. There are still some experimental APIs (f.e. the rename for
rte_cryptodev_sym_session_get_private_datamarked 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
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(), andrte_service_attr_reset_all()were introduced nearly a year ago inDPDK
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.Signed-off-by Gage Eads <[email protected]>--- 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@@ -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 usingdrivers/event/sw/meson.build +0
-0drivers/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 = trueI don't think you can remove these. There are still some experimental APIs (f.e. the rename for
rte_cryptodev_sym_session_get_private_datamarked 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_experimentaltag 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
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 inDPDK
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, andthis
Review
Quoted 26 lines
commit allows them to not need any experimental API.
Signed-off-by Gage Eads <[email protected]>--- 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@@ -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
-0b/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 = trueI don't think you can remove these. There are still some experimental APIs (f.e. the rename for
rte_cryptodev_sym_session_get_private_datamarked 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_experimentaltag 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_sessionQuoted 3 lines
*sess);
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
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 inDPDK
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, andthis
Review
Quoted 26 lines
commit allows them to not need any experimental API.
Signed-off-by Gage Eads <[email protected]>--- 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@@ -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
-0b/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 = trueI don't think you can remove these. There are still some experimental APIs (f.e. the rename for
rte_cryptodev_sym_session_get_private_datamarked 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_experimentaltag 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_sessionQuoted 3 lines
*sess);
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_experimentalis 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
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_experimentalis 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
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_experimentalis the first thing of a symbolQuoted 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_experimentalrte_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_experimentaltag 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.hbut without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining thatrte_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_APIflag.- 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
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_experimentalis the first thing of a symboldeclaration.
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_experimentalrte_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_experimentaltag 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_experimentalexpands to a__attribute__(...), you have to place it there.Quoted 3 lines
If I try to compile some sources which includes
rte_mbuf.hbut without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining thatrte_mbuf_buf_addr()is deprecated, even if this inlineis
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
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_experimentalis the first thing of a symboldeclaration.
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_experimentalrte_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_experimentaltag 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_experimentalexpands to a__attribute__(...), you have to place it there.Quoted 3 lines
If I try to compile some sources which includes
rte_mbuf.hbut without -DALLOW_EXPERIMENTAL_API, then gcc errors at including the header, complaining thatrte_mbuf_buf_addr()is deprecated, even if this inlineis
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 inrte_mbuf_data_addr_default(), both of them are unused by the includers ofrte_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 -Walldeprecated.cdeprecated.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
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_experimentalis the first thing of a symboldeclaration.
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_experimentalrte_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_experimentaltag withoutgetting
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_experimentalexpands to a__attribute__(...), you have to place it there.Quoted 1 line
If I try to compile some sources which includes
rte_mbuf.hbutwithout
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 thisinline
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 ifthe
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. Canyou
Quoted 4 lines
Quoted 3 lines
provide a code sample that demonstrates this?
rte_mbuf_buf_addr()is called inrte_mbuf_data_addr_default(), both ofthem
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 -Walldeprecated.cdeprecated.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:
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
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_experimentalis the first thing of a symboldeclaration.
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_experimentalrte_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_experimentaltag withoutgetting
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_experimentalexpands to a__attribute__(...), you have to place it there.Quoted 1 line
If I try to compile some sources which includes
rte_mbuf.hbutwithout
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 thisinline
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 ifthe
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. Canyou
Quoted 4 lines
Quoted 3 lines
provide a code sample that demonstrates this?
rte_mbuf_buf_addr()is called inrte_mbuf_data_addr_default(), both ofthem
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 -Walldeprecated.cdeprecated.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:
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
PATCH v2 1/1 eal: promote some service core functions to stable
In reply to Gage EadsThe 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
Quoted 97 lines · Gage Eads
The functions
rte_service_may_be_active(),rte_service_lcore_attr_get(), andrte_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.Signed-off-by Gage Eads <[email protected]>--- 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 APIdrivers/event/sw/Makefile +0
-1@@ -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 usingdrivers/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 sources = files('sw_evdev_scheduler.c', 'sw_evdev_selftest.c', 'sw_evdev_worker.c',lib/librte_eal/common/include/rte_service.h +0
-2@@ -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
servicelib/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_tattr_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
__cpluspluslib/librte_eal/common/rte_service.c +1
-1@@ -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@@ -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
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
@@ -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
@@ -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
@@ -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.
Thomas Monjalon
Applied20/06/2019 21:02, Gage Eads:
Quoted 8 lines
The functions
rte_service_may_be_active(),rte_service_lcore_attr_get(), andrte_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.Signed-off-by Gage Eads <[email protected]>
Applied, thanks