From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37E06A056A; Wed, 10 Mar 2021 18:25:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDC8322A400; Wed, 10 Mar 2021 18:24:56 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 7956640F35 for ; Wed, 10 Mar 2021 18:24:53 +0100 (CET) IronPort-SDR: GJ2MbEHFJCgMwIJXp1Dtk0aM2kuf5fMDQwQ5CJvDOzudn1zWes9WGFXeYa47P7pVS4CFXc7gD+ NHES7XgPG1FA== X-IronPort-AV: E=McAfee;i="6000,8403,9919"; a="185164660" X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="185164660" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 09:24:53 -0800 IronPort-SDR: EHAGuGzB7bLq6P4yPEWjnZloQW7A29bDFTMcqT2UGsposw65v3mEDLkIuomiir8FLEzXZodD/C lFlywQjgo3iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="410271733" Received: from silpixa00399126.ir.intel.com ([10.237.223.188]) by orsmga008.jf.intel.com with ESMTP; 10 Mar 2021 09:24:52 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Kevin Laatz Date: Wed, 10 Mar 2021 17:24:30 +0000 Message-Id: <20210310172430.412405-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210310172430.412405-1-bruce.richardson@intel.com> References: <20210310172430.412405-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 4/4] telemetry: move init function to internal header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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(-) 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 #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 23e3a32036..da2d6602a8 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 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 -- 2.27.0