Patchwork [dpdk-dev] log: add missing experimental tag

login
register
mail settings
Submitter David Marchand
Date Dec. 4, 2018, 8:28 a.m.
Message ID <1543912111-8106-1-git-send-email-david.marchand@redhat.com>
Download mbox | patch
Permalink /patch/671643/
State New
Headers show

Comments

David Marchand - Dec. 4, 2018, 8:28 a.m.
When rte_log_register_type_and_pick_level() has been introduced, it has
been correctly added to the EXPERIMENTAL section of the eal map and the
symbol itself has been marked at its definition.

However, the declaration of this symbol in rte_log.h is missing the
__rte_experimental tag.
Because of this, a user can try to call this symbol without being aware
this is an experimental api (neither compilation nor link warning).

Fixes: b22e77c02620 ("eal: register log type and pick level from args")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/include/rte_log.h | 2 ++
 1 file changed, 2 insertions(+)
Neil Horman - Dec. 4, 2018, 3:18 p.m.
On Tue, Dec 04, 2018 at 09:28:31AM +0100, David Marchand wrote:
> When rte_log_register_type_and_pick_level() has been introduced, it has
> been correctly added to the EXPERIMENTAL section of the eal map and the
> symbol itself has been marked at its definition.
> 
> However, the declaration of this symbol in rte_log.h is missing the
> __rte_experimental tag.
> Because of this, a user can try to call this symbol without being aware
> this is an experimental api (neither compilation nor link warning).
> 
> Fixes: b22e77c02620 ("eal: register log type and pick level from args")
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  lib/librte_eal/common/include/rte_log.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
> index 2f789cb..f334efc 100644
> --- a/lib/librte_eal/common/include/rte_log.h
> +++ b/lib/librte_eal/common/include/rte_log.h
> @@ -24,6 +24,7 @@
>  
>  #include <rte_common.h>
>  #include <rte_config.h>
> +#include <rte_compat.h>
>  
>  struct rte_log_dynamic_type;
>  
> @@ -226,6 +227,7 @@ struct rte_logs {
>   *    - >=0: the newly registered log type
>   *    - <0: rte_log_register() error value
>   */
> +__rte_experimental
>  int rte_log_register_type_and_pick_level(const char *name, uint32_t level_def);
>  
>  /**
> -- 
> 1.8.3.1
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

Patch

diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index 2f789cb..f334efc 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -24,6 +24,7 @@ 
 
 #include <rte_common.h>
 #include <rte_config.h>
+#include <rte_compat.h>
 
 struct rte_log_dynamic_type;
 
@@ -226,6 +227,7 @@  struct rte_logs {
  *    - >=0: the newly registered log type
  *    - <0: rte_log_register() error value
  */
+__rte_experimental
 int rte_log_register_type_and_pick_level(const char *name, uint32_t level_def);
 
 /**