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 D9D6EA04A2; Fri, 22 May 2020 19:00:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95BD81D9E1; Fri, 22 May 2020 19:00:40 +0200 (CEST) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id 367DF1D9DE for ; Fri, 22 May 2020 19:00:39 +0200 (CEST) Received: by mail-il1-f196.google.com with SMTP id 4so11378667ilg.1 for ; Fri, 22 May 2020 10:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sz5xRfy6qqELfUSQubBK/4FDb2U9fbtAMopZKBeBsgE=; b=M8AVOfa2Jo030HWuOU2j+bRa5VZPDbfjbETR41teI6fXVEoJQDhBiVyPoBYuWLelFy z12cRmPKrC2n0jVt/QAspXo51IP7jj/oKMUc1hq8319HFB4wH7zD2RyiCgoolXfzr4f/ wYN8gd3/r9lomgGc2tWFpQ3DYmRfvHNGl7HWn+UV/u0iyNsP8dyWRsxGE6sXmcZCnHJJ wAGCcqU6l8P/HtYYlOYJLjPDfl9V66lj6WgOL/y0fKTP92GvmLsI83RemLXPOs+iKtVt v+2ZLMpKlYZ+n/DXJa6wYLX20oLcwR4VCKeKs7G30U7nmBOY2ouJbE6tGZ6CvkL4lR0E P+tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sz5xRfy6qqELfUSQubBK/4FDb2U9fbtAMopZKBeBsgE=; b=SbGBIGyAeG68TAk+s5+HhIEvYluLL+HZIVuoqrU/BoMGPKIQUiYCPvZi8bER5flktj PCjf3NrvDIhEuJKB0ph91Mqe/X9pQ71TH0YH55jhQHQN0Ks+P3Lm+w/DVLw6g+VNCN67 SChLbUnsQD9pDtMO3jdkZpATAf+gkBSecTXttFOHjWdLpY7efC3IUsvCSC8LmspeIh4e 1T7wx7b8eE/ZeOWSgx5/j3z3YcnUr02IGixdjhllfyJbAWuiUIZ9eQquoFwE/gLsSWB3 KUdYbsUvl/rp3pEB9fo0G/sQBYdWFb5PmqLgu+sn+7xK3UpchznOiJr/0HB2WTi3uC7n zTjg== X-Gm-Message-State: AOAM5326/LfIIMlP4UvsJat0vJCzkA1CvmCTGw+vNlGRoSmqyrqNMP1e 1iFpJW3P2RRmD/ZpED434tzbkAfsBtDnIGHOvtQ= X-Google-Smtp-Source: ABdhPJyt+zDDZP6VkK6WuDqL9LfZGWhrHgfj3nw/vqfO1oR/1HwAxUIO13VPCr43GuCG0ovVEMPqkeOotRHq+gKhuZg= X-Received: by 2002:a05:6e02:589:: with SMTP id c9mr14256386ils.271.1590166838460; Fri, 22 May 2020 10:00:38 -0700 (PDT) MIME-Version: 1.0 References: <20200522134839.15911-1-ciara.power@intel.com> <20200522164818.GA887@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20200522164818.GA887@bricha3-MOBL.ger.corp.intel.com> From: Jerin Jacob Date: Fri, 22 May 2020 22:30:22 +0530 Message-ID: To: Bruce Richardson Cc: Ciara Power , "Laatz, Kevin" , dpdk-dev , Jerin Jacob , David Marchand , Thomas Monjalon , "Wiles, Keith" Content-Type: text/plain; charset="UTF-8" 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:18 PM Bruce Richardson wrote: > > 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. OK. > BTW: if you compile with jansson library available, the legacy callbacks > will be available and this will be silenced. I see. > > /Bruce