[V4,1/9] telemetry: move to header to controllable range

Message ID 20221213101512.39919-2-lihuisong@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series telemetry: fix data truncation and conversion error and add hex integer API |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

lihuisong (C) Dec. 13, 2022, 10:15 a.m. UTC
  The "stdint.h" header is outside '_RTE_TELEMETRY_H_' macro, which cause
this header is uncontrollable. So this patch moves this header to inside
'_RTE_TELEMETRY_H_'.

Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/telemetry/rte_telemetry.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson Dec. 13, 2022, 5:10 p.m. UTC | #1
On Tue, Dec 13, 2022 at 06:15:04PM +0800, Huisong Li wrote:
> The "stdint.h" header is outside '_RTE_TELEMETRY_H_' macro, which cause
> this header is uncontrollable. So this patch moves this header to inside
> '_RTE_TELEMETRY_H_'.

s/uncontrollable/unconditional/ ??

> 
> Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
lihuisong (C) Dec. 14, 2022, 2:44 a.m. UTC | #2
在 2022/12/14 1:10, Bruce Richardson 写道:
> On Tue, Dec 13, 2022 at 06:15:04PM +0800, Huisong Li wrote:
>> The "stdint.h" header is outside '_RTE_TELEMETRY_H_' macro, which cause
>> this header is uncontrollable. So this patch moves this header to inside
>> '_RTE_TELEMETRY_H_'.
> s/uncontrollable/unconditional/ ??
Ack
>
>> Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> Acked-by: Morten Brørup <mb@smartsharesystems.com>
>> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> .
  

Patch

diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index d9918c4e96..40e9a3bf9d 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -2,9 +2,6 @@ 
  * Copyright(c) 2018 Intel Corporation
  */
 
-#include <stdint.h>
-
-
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
@@ -12,6 +9,8 @@ 
 extern "C" {
 #endif
 
+#include <stdint.h>
+
 /** Maximum length for string used in object. */
 #define RTE_TEL_MAX_STRING_LEN 128
 /** Maximum length of string. */