[4/4] telemetry: move init function to internal header

Message ID 20210310172430.412405-5-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series telemetry logging improvements and cleanup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Bruce Richardson March 10, 2021, 5:24 p.m. UTC
  The rte_telemetry_init() function is for EAL use only, so can be moved to
the internal header rather than being in the public one.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal.c              |  2 +-
 lib/librte_eal/linux/eal.c                |  2 +-
 lib/librte_telemetry/rte_telemetry.h      | 29 -----------------------
 lib/librte_telemetry/telemetry_internal.h | 29 +++++++++++++++++++++++
 4 files changed, 31 insertions(+), 31 deletions(-)
  

Comments

Power, Ciara March 11, 2021, 12:51 p.m. UTC | #1
>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Bruce Richardson
>Sent: Wednesday 10 March 2021 17:25
>To: dev@dpdk.org
>Cc: Richardson, Bruce <bruce.richardson@intel.com>; Laatz, Kevin
><kevin.laatz@intel.com>
>Subject: [dpdk-dev] [PATCH 4/4] telemetry: move init function to internal
>header
>
>The rte_telemetry_init() function is for EAL use only, so can be moved to the
>internal header rather than being in the public one.
>
>Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>---
> lib/librte_eal/freebsd/eal.c              |  2 +-
> lib/librte_eal/linux/eal.c                |  2 +-
> lib/librte_telemetry/rte_telemetry.h      | 29 -----------------------
> lib/librte_telemetry/telemetry_internal.h | 29 +++++++++++++++++++++++
> 4 files changed, 31 insertions(+), 31 deletions(-)
>
<snip>


Acked-by: Ciara Power <ciara.power@intel.com>
  

Patch

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index b8a798bc7d..be02f70510 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -42,7 +42,7 @@ 
 #include <rte_version.h>
 #include <rte_vfio.h>
 #include <malloc_heap.h>
-#include <rte_telemetry.h>
+#include <telemetry_internal.h>
 
 #include "eal_private.h"
 #include "eal_thread.h"
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 23e3a32036..da2d6602a8 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -49,8 +49,8 @@ 
 #include <rte_version.h>
 #include <malloc_heap.h>
 #include <rte_vfio.h>
-#include <rte_telemetry.h>
 
+#include <telemetry_internal.h>
 #include "eal_private.h"
 #include "eal_thread.h"
 #include "eal_internal_cfg.h"
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 2c3da3ab7f..334ea8ddd4 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -292,35 +292,6 @@  __rte_experimental
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help);
 
-/**
- * @internal
- * Log function type, to allow passing as parameter if necessary
- */
-typedef int (*rte_log_fn)(uint32_t level, uint32_t logtype, const char *format, ...);
-
-/**
- * @internal
- * Initialize Telemetry.
- *
- * @param runtime_dir
- * The runtime directory of DPDK.
- * @param cpuset
- * The CPU set to be used for setting the thread affinity.
- * @param log_fn
- * Function pointer to the rte_log function for logging use
- * @param registered_logtype
- * The registered log type to use for logging
- *
- * @return
- *  0 on success.
- * @return
- *  -1 on failure.
- */
-__rte_internal
-int
-rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
-		rte_log_fn log_fn, uint32_t registered_logtype);
-
 /**
  * Get a pointer to a container with memory allocated. The container is to be
  * used embedded within an existing telemetry dict/array.
diff --git a/lib/librte_telemetry/telemetry_internal.h b/lib/librte_telemetry/telemetry_internal.h
index ad076b9119..601f16cc96 100644
--- a/lib/librte_telemetry/telemetry_internal.h
+++ b/lib/librte_telemetry/telemetry_internal.h
@@ -84,4 +84,33 @@  rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn);
 
+/**
+ * @internal
+ * Log function type, to allow passing as parameter if necessary
+ */
+typedef int (*rte_log_fn)(uint32_t level, uint32_t logtype, const char *format, ...);
+
+/**
+ * @internal
+ * Initialize Telemetry.
+ *
+ * @param runtime_dir
+ * The runtime directory of DPDK.
+ * @param cpuset
+ * The CPU set to be used for setting the thread affinity.
+ * @param log_fn
+ * Function pointer to the rte_log function for logging use
+ * @param registered_logtype
+ * The registered log type to use for logging
+ *
+ * @return
+ *  0 on success.
+ * @return
+ *  -1 on failure.
+ */
+__rte_internal
+int
+rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
+		rte_log_fn log_fn, uint32_t registered_logtype);
+
 #endif