DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Ciara Power <ciara.power@intel.com>,
	Kevin Laatz <kevin.laatz@intel.com>
Subject: [dpdk-dev] [PATCH v2 4/4] telemetry: move init function to internal header
Date: Thu, 25 Mar 2021 13:57:07 +0000	[thread overview]
Message-ID: <20210325135707.325536-5-bruce.richardson@intel.com> (raw)
In-Reply-To: <20210325135707.325536-1-bruce.richardson@intel.com>

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>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 lib/librte_eal/freebsd/eal.c              |  2 +-
 lib/librte_eal/linux/eal.c                |  2 +-
 lib/librte_telemetry/rte_telemetry.h      | 32 ----------------------
 lib/librte_telemetry/telemetry_internal.h | 33 +++++++++++++++++++++++
 4 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 97ce9976c..32442e5ba 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 f6dd67b6d..abbb53774 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 d38894b97..fd57718c2 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -292,38 +292,6 @@ __rte_experimental
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help);
 
-#ifdef RTE_HAS_CPUSET
-
-/**
- * @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, const char *rte_version, rte_cpuset_t *cpuset,
-		rte_log_fn log_fn, uint32_t registered_logtype);
-
-#endif /* RTE_HAS_CPUSET */
 
 /**
  * Get a pointer to a container with memory allocated. The container is to be
diff --git a/lib/librte_telemetry/telemetry_internal.h b/lib/librte_telemetry/telemetry_internal.h
index ad076b911..6c5200604 100644
--- a/lib/librte_telemetry/telemetry_internal.h
+++ b/lib/librte_telemetry/telemetry_internal.h
@@ -84,4 +84,37 @@ rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn);
 
+#ifdef RTE_HAS_CPUSET
+
+/**
+ * @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, const char *rte_version, rte_cpuset_t *cpuset,
+		rte_log_fn log_fn, uint32_t registered_logtype);
+
+#endif /* RTE_HAS_CPUSET */
+
 #endif
-- 
2.27.0


  parent reply	other threads:[~2021-03-25 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 17:24 [dpdk-dev] [PATCH 0/4] telemetry logging improvements and cleanup Bruce Richardson
2021-03-10 17:24 ` [dpdk-dev] [PATCH 1/4] telemetry: use rte_log for logging Bruce Richardson
2021-03-11 12:50   ` Power, Ciara
2021-03-10 17:24 ` [dpdk-dev] [PATCH 2/4] telemetry: make the legacy registration function internal Bruce Richardson
2021-03-11 12:50   ` Power, Ciara
2021-03-10 17:24 ` [dpdk-dev] [PATCH 3/4] telemetry: create internal-only header file Bruce Richardson
2021-03-11 12:51   ` Power, Ciara
2021-03-10 17:24 ` [dpdk-dev] [PATCH 4/4] telemetry: move init function to internal header Bruce Richardson
2021-03-11 12:51   ` Power, Ciara
2021-03-24 21:11 ` [dpdk-dev] [PATCH 0/4] telemetry logging improvements and cleanup Thomas Monjalon
2021-03-25  8:55   ` Bruce Richardson
2021-03-25 13:57 ` [dpdk-dev] [PATCH v2 " Bruce Richardson
2021-03-25 13:57   ` [dpdk-dev] [PATCH v2 1/4] telemetry: use rte_log for logging Bruce Richardson
2021-03-25 14:09     ` David Marchand
2021-03-25 14:16       ` Bruce Richardson
2021-03-25 13:57   ` [dpdk-dev] [PATCH v2 2/4] telemetry: make the legacy registration function internal Bruce Richardson
2021-03-25 13:57   ` [dpdk-dev] [PATCH v2 3/4] telemetry: rename internal-only header file Bruce Richardson
2021-03-25 13:57   ` Bruce Richardson [this message]
2021-03-25 16:36   ` [dpdk-dev] [PATCH v2 0/4] telemetry logging improvements and cleanup Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210325135707.325536-5-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).