From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 35E29E5D for ; Fri, 8 Dec 2017 16:37:45 +0100 (CET) Received: from lfbn-1-6068-189.w90-110.abo.wanadoo.fr ([90.110.3.189] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eNKod-0006Q0-F4; Fri, 08 Dec 2017 16:43:57 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 08 Dec 2017 16:37:32 +0100 Date: Fri, 8 Dec 2017 16:37:32 +0100 From: Olivier MATZ To: Pavan Nikhilesh Bhagavatula Cc: ferruh.yigit@intel.com, thomas@monjalon.net, dev@dpdk.org Message-ID: <20171208153731.qx5wvuvocq5j7n3e@platinum> References: <20171122092806.17194-1-pbhagavatula@caviumnetworks.com> <20171122092806.17194-3-pbhagavatula@caviumnetworks.com> <20171207132120.nwrshnurnn74qhsg@glumotte.dev.6wind.com> <20171207140713.d6s5mh6ggncs3b3p@Pavan-LT> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171207140713.d6s5mh6ggncs3b3p@Pavan-LT> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 3/3] logs: remove log level config option 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: Fri, 08 Dec 2017 15:37:45 -0000 On Thu, Dec 07, 2017 at 07:37:14PM +0530, Pavan Nikhilesh Bhagavatula wrote: > Hi Oliver, > > Thanks for the review. > > On Thu, Dec 07, 2017 at 02:21:21PM +0100, Olivier MATZ wrote: > > On Wed, Nov 22, 2017 at 02:58:06PM +0530, Pavan Nikhilesh wrote: > > > --- a/test/test/test.h > > > +++ b/test/test/test.h > > > @@ -204,7 +204,7 @@ struct unit_test_case { > > > > > > #define TEST_CASES_END() { NULL, NULL, NULL, NULL, 0 } > > > > > > -#if RTE_LOG_LEVEL >= RTE_LOG_DEBUG > > > +#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG > > > #define TEST_HEXDUMP(file, title, buf, len) rte_hexdump(file, title, buf, len) > > > #else > > > #define TEST_HEXDUMP(file, title, buf, len) do {} while (0) > > > > For drivers, it looks correct to replace RTE_LOG_LEVEL by > > RTE_LOG_DP_LEVEL, from what I see it's about dataplane logs. > > > > For l3fwd, I'm less sure, but it could make sense too. > > > > For test, I think we should replace TEST_HEXDUMP() by a function > > that checks the runtime log level instead of relying on RTE_LOG_DP_LEVEL. > > I can submit a patch for this. > > Agreed. Please see: http://dpdk.org/ml/archives/dev/2017-December/083295.html By the way, if you do another version on top of this patchset, I think you can also do the following replacement for consistency: --- a/lib/librte_flow_classify/rte_flow_classify.c +++ b/lib/librte_flow_classify/rte_flow_classify.c @@ -685,7 +685,7 @@ static void librte_flow_classify_init_log(void) { librte_flow_classify_logtype = - rte_log_register("librte.flow_classify"); + rte_log_register("lib.flow_classify"); if (librte_flow_classify_logtype >= 0) rte_log_set_level(librte_flow_classify_logtype, RTE_LOG_INFO); } diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c index cc9ea84ae..84354cc38 100644 --- a/lib/librte_member/rte_member.c +++ b/lib/librte_member/rte_member.c @@ -330,7 +330,7 @@ RTE_INIT(librte_member_init_log); static void librte_member_init_log(void) { - librte_member_logtype = rte_log_register("librte.member"); + librte_member_logtype = rte_log_register("lib.member"); if (librte_member_logtype >= 0) rte_log_set_level(librte_member_logtype, RTE_LOG_DEBUG); } Thanks, Olivier