From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 5D1ACF94 for ; Tue, 18 Apr 2017 17:25:52 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id o81so59198249wmb.1 for ; Tue, 18 Apr 2017 08:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ezBWW8MG0B9wviX55Jf0NyQKdN10n39fGXk40GQTS9k=; b=0m0ehVi4l0PhTkhvDKQJZdn/hwQPnDxwSCk78zHSvfbCp+f+3zyrZ9Bl/DrerkV/yk nHQQvLPmq0FMVKuGAAsFLbEOExLRZORDOhEzJtYjRFWHIKOkQ1RQOZ4GhTqgoDT6iwyo NF7d/QYN3BSZms6IRBn84mqlocN2B4ReBIzg7980If2un03aTh/Oc7hlrmEWX3JzUmgr raywPuPrbSqFR+iceDvr+CnYSNK1Om9GCK+3ZGsC6YoGPiH08BzCczzI5j4imYuErgNR tLREPBTCISWTR7JIvANorfRbMjb3QjZPSbTvWWsN4JxLHpfjVta3p3BaMULXqUyXmZKe IJjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ezBWW8MG0B9wviX55Jf0NyQKdN10n39fGXk40GQTS9k=; b=nW/GCjghgRImdQDbxybA7Abu6upuKS6NglnfhwJJSqMRFszMtFFiWkxNGHNZuykaDP JdJTsAlxMEj+Rntg+gzAjIxlVTk3S+LnqsM9mCi4vvgrOYnkNSql8SOpLg7qPtEApSED ycaL2GQMpC1udmZAESnk1d37j9cHLim+gY1xa8TwWaX1U5mjRsKAWWXAqC+XpH20jylI ee/Webg01ZGpNk4x/pdV+xEEARsD4WEGZggEw5t9R681KdddObmlnvXr9YKcsQfrnEq1 0e7HfIT0TOx196avugi7ht67YVHxsp+i2VZhBo6DM8QdILNG4gExGfagjq1clOw2QqV/ aKOg== X-Gm-Message-State: AN3rC/7ujrPAwS+5e0K/hOPws1pZTpdEz2XywzXeXAgCzURNbxRxgIbj /uCyfzKwEuf7D9ob X-Received: by 10.28.93.13 with SMTP id r13mr2724032wmb.136.1492529152105; Tue, 18 Apr 2017 08:25:52 -0700 (PDT) Received: from glumotte.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t85sm15389019wmt.23.2017.04.18.08.25.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Apr 2017 08:25:52 -0700 (PDT) Date: Tue, 18 Apr 2017 17:26:19 +0200 From: Olivier MATZ To: Ferruh Yigit Cc: dev@dpdk.org, jianfeng.tan@intel.com, thomas@monjalon.net Message-ID: <20170418172619.2889e7d2@glumotte.dev.6wind.com> In-Reply-To: References: <20170418142225.6308-1-olivier.matz@6wind.com> <20170418142225.6308-3-olivier.matz@6wind.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 3/6] eal: remove log level from internal config 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: , X-List-Received-Date: Tue, 18 Apr 2017 15:25:52 -0000 Hi Ferruh, On Tue, 18 Apr 2017 16:00:45 +0100, Ferruh Yigit w= rote: > On 4/18/2017 3:22 PM, Olivier Matz wrote: > > This field is only used in the initialization phase. Remove it since the > > global log level can also be retrieved using a public API: > > rte_log_get_global_level(). > >=20 > > Signed-off-by: Olivier Matz =20 >=20 > <...> >=20 > > diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/co= mmon/eal_common_log.c > > index dd4d30ca7..7d13cc026 100644 > > --- a/lib/librte_eal/common/eal_common_log.c > > +++ b/lib/librte_eal/common/eal_common_log.c > > @@ -244,6 +244,12 @@ RTE_INIT(rte_log_init); > > static void > > rte_log_init(void) > > { > > +#if RTE_LOG_LEVEL >=3D RTE_LOG_DEBUG =20 >=20 > Why ">=3D" (I aware previous one is also like this :), setting global > config option to RTE_LOG_DEBUG cause a INFO level log... >=20 > > + rte_log_set_global_level(RTE_LOG_INFO); > > +#else > > + rte_log_set_global_level(RTE_LOG_LEVEL); > > +#endif =20 >=20 =46rom what I see, in the previous commit 9b9d7caa8414 ("log: increase default level to info"), some code was added to prevent to set the default log level to DEBUG, because it has an impact on performance. =20 But since commit 5d8f0baf69ea ("log: do not drop debug logs at compile time= "), the logs that impact performance should use RTE_LOG_DP(). I think this can be removed, and changed to: rte_log_set_global_level(RTE_LOG_LEVEL); I did not do it in this patchset because I think it can wait next version.