From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D3D7A04A2; Fri, 22 May 2020 18:48:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 309B51D9DB; Fri, 22 May 2020 18:48:27 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2D25D1D9DA for ; Fri, 22 May 2020 18:48:24 +0200 (CEST) IronPort-SDR: hEgapv+JFvY5+BC2+ECsrMtQ+OJbfUPTzq4TuMjuyWFBQXKuzzNI7PspLnOwPhfnks0XeUZLYb cxDDcp/ixJlw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 09:48:24 -0700 IronPort-SDR: Fb8Zsg9F7kaXcnRHiZ+jW3lh4llwvlwV1WDvhsjgMmw9jaHACHFkYHXTKMytEX0qyfx/ktvaOa AdabDztA8AdA== X-IronPort-AV: E=Sophos;i="5.73,422,1583222400"; d="scan'208";a="440909968" Received: from bricha3-mobl.ger.corp.intel.com ([10.251.85.183]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 22 May 2020 09:48:22 -0700 Date: Fri, 22 May 2020 17:48:18 +0100 From: Bruce Richardson To: Jerin Jacob Cc: Ciara Power , "Laatz, Kevin" , dpdk-dev , Jerin Jacob , David Marchand , Thomas Monjalon , "Wiles, Keith" Message-ID: <20200522164818.GA887@bricha3-MOBL.ger.corp.intel.com> References: <20200522134839.15911-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] telemetry: fix error and warning printfs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Fri, May 22, 2020 at 10:04:44PM +0530, Jerin Jacob wrote: > On Fri, May 22, 2020 at 7:21 PM Ciara Power wrote: > > > > Initially, printf was used to indicate and error/warning resulting from > > telemetry initialisation. This is now fixed to use EAL logs for > > warnings, and the unnecessary printf for an error is removed. > > > > Fixes: eeb486f3ba65 ("eal: add telemetry as dependency") > > Fixes: dd6275a424ac ("telemetry: fix error log output") > > Cc: david.marchand@redhat.com > > > > Signed-off-by: Ciara Power > > --- > > lib/librte_eal/freebsd/eal.c | 4 +++- > > lib/librte_eal/linux/eal.c | 4 +++- > > lib/librte_telemetry/rte_telemetry.h | 9 +++++++++ > > lib/librte_telemetry/telemetry.c | 2 -- > > 4 files changed, 15 insertions(+), 4 deletions(-) > > > > diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c > > index 14b52168e..07456059e 100644 > > --- a/lib/librte_eal/freebsd/eal.c > > +++ b/lib/librte_eal/freebsd/eal.c > > @@ -956,13 +956,15 @@ rte_eal_init(int argc, char **argv) > > return -1; > > } > > if (!internal_config.no_telemetry) { > > - const char *error_str; > > + const char *error_str = NULL; > > if (rte_telemetry_init(rte_eal_get_runtime_dir(), > > &internal_config.ctrl_cpuset, &error_str) > > != 0) { > > rte_eal_init_alert(error_str); > > return -1; > > } > > + if (error_str != NULL) > > + RTE_LOG(WARNING, EAL, "%s\n", error_str); > > } > > > > eal_mcfg_complete(); > > diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c > > index 9620d2544..10317a660 100644 > > --- a/lib/librte_eal/linux/eal.c > > +++ b/lib/librte_eal/linux/eal.c > > @@ -1294,13 +1294,15 @@ rte_eal_init(int argc, char **argv) > > return -1; > > } > > if (!internal_config.no_telemetry) { > > - const char *error_str; > > + const char *error_str = NULL; > > if (rte_telemetry_init(rte_eal_get_runtime_dir(), > > &internal_config.ctrl_cpuset, &error_str) > > != 0) { > > rte_eal_init_alert(error_str); > > return -1; > > } > > + if (error_str != NULL) > > + RTE_LOG(WARNING, EAL, "%s\n", error_str); > > "EAL: No legacy callbacks, legacy socket not created" comes all the times now. > Should we treat this as a warning? as it comes for with for the > built-in applications? > If it is important why not have a default handler in the EAL library? > Perhaps the warning level could be changed to INFO. BTW: if you compile with jansson library available, the legacy callbacks will be available and this will be silenced. /Bruce