From: Bruce Richardson Date: Thu, 25 Mar 2021 13:57:07 +0000 (+0000) Subject: telemetry: move init function to internal header X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0e64ae618e10;p=dpdk.git 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 Acked-by: Ciara Power --- diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c index 97ce9976cd..32442e5ba6 100644 --- a/lib/librte_eal/freebsd/eal.c +++ b/lib/librte_eal/freebsd/eal.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #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 f6dd67b6da..abbb537746 100644 --- a/lib/librte_eal/linux/eal.c +++ b/lib/librte_eal/linux/eal.c @@ -49,8 +49,8 @@ #include #include #include -#include +#include #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 d38894b97a..fd57718c26 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 ad076b9119..6c52006040 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