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 EA1B7A0A02; Thu, 25 Mar 2021 14:57:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9677A140D93; Thu, 25 Mar 2021 14:57:41 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 71367140D87 for ; Thu, 25 Mar 2021 14:57:38 +0100 (CET) IronPort-SDR: 8OOtUArV7DFi4053+z9JJ8JUhdZIIZEI/X3yPwo3O6htcGSBkHSizkvAIavB0HgD5j4nDgUI6i VkeJzUpK/lkA== X-IronPort-AV: E=McAfee;i="6000,8403,9933"; a="170910579" X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="170910579" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 06:57:38 -0700 IronPort-SDR: iAPCKISaBVbBtTaaaL7AiYiYZ8ceDSTonPvWW8ndjBwwh/HLtZY4EzuAvjvflx8XI67u/2YAVC xJanDGoHuM1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="436466542" Received: from silpixa00399126.ir.intel.com ([10.237.223.116]) by fmsmga004.fm.intel.com with ESMTP; 25 Mar 2021 06:57:36 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Ciara Power , Kevin Laatz Date: Thu, 25 Mar 2021 13:57:07 +0000 Message-Id: <20210325135707.325536-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325135707.325536-1-bruce.richardson@intel.com> References: <20210310172430.412405-1-bruce.richardson@intel.com> <20210325135707.325536-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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 Acked-by: Ciara Power --- 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 #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 f6dd67b6d..abbb53774 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 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