From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id F26772E8A for ; Wed, 12 Apr 2017 15:47:23 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 12 Apr 2017 06:47:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,190,1488873600"; d="scan'208";a="73033733" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga002.jf.intel.com with ESMTP; 12 Apr 2017 06:47:21 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.239]) by IRSMSX153.ger.corp.intel.com ([163.33.192.75]) with mapi id 14.03.0319.002; Wed, 12 Apr 2017 14:47:21 +0100 From: "De Lara Guarch, Pablo" To: Thomas Monjalon CC: Olivier Matz , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs Thread-Index: AQHSrWLYCYBKRhKbW0CJ5n09VnxKCaHBgIkwgAAFgACAADox8P//9dWAgAAVAeA= Date: Wed, 12 Apr 2017 13:47:20 +0000 Message-ID: References: <20170329155323.4760-1-olivier.matz@6wind.com> <3021295.5zDAG2DLiv@xps13> <1731928.s789XWeaOP@xps13> In-Reply-To: <1731928.s789XWeaOP@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWViNWZkYjEtM2RjYS00YjAxLWE0NGQtYWI3MmZhZDY0YTAxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InQ0XC91N0luU05lR290SXZvelVzRTJGYXNjYnNPTzhLcTdkXC94bGU4SkVIST0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs 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: Wed, 12 Apr 2017 13:47:24 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, April 12, 2017 2:29 PM > To: De Lara Guarch, Pablo > Cc: Olivier Matz; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs >=20 > 2017-04-12 13:11, De Lara Guarch, Pablo: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > Sent: Wednesday, April 12, 2017 11:38 AM > > > 2017-04-12 09:26, De Lara Guarch, Pablo: > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz > > > > > > > > > > The objective of this patchset is to introduce a framework to > > > > > support dynamic log types in EAL. It also provides one example of > use > > > > > (in i40e). > > > > > > > > > > Features: > > > > > - log types are identified by a string > > > > > - at registration, a uniq identifier is associated to a log type > > > > > - each log type can have its level changed dynamically > > > > > - extend command line parameters to set the log level of a specif= ic > > > > > type, or logs matching a regular expression > > > > > - keep compat with other legacy types (eal, malloc, ring, user*, > > > > > etc... keep their hardcoded log type value) > > > > > > > > > > Next step is to adapt drivers, libs and apps to use this new API.= At > the > > > > > end, we can expect that all non-dataplane logs are moved to be > > > dynamic, > > > > > so we can enable/disable them at runtime, without recompiling. > Many > > > > > debug options can probably be removed from configuration: > > > > > $ git grep DEBUG config/common_base | wc -l > > > > > 89 > > > [...] > > > > With this patch, all logs that use logtype "USERX" (e.g. > > > RTE_LOGTYPE_USER1) are not shown anymore. > > > > Should these macro be removed? > > > > > > > > Right now, all applications using this won't show these, so I assum= e > that > > > all of them > > > > should be fixed before the release is out. > > > > Is that correct? > > > > > > Is it a bug in the commit http://dpdk.org/commit/c1b5fa9 ? > > > Note this line: > > > __rte_log_register("user1", 24); > > > > This also happens with libraries, like HASH. I think the problem might = be > here: > > > > @@ -139,7 +266,11 @@ rte_vlog(uint32_t level, uint32_t logtype, const > char *format, va_list ap) > > } > > } > > > > - if ((level > rte_logs.level) || !(logtype & rte_logs.type)) > > + if (level > rte_logs.level) > > + return 0; > > + if (logtype >=3D rte_logs.dynamic_types_len) > > + return -1; > > + if (level > rte_logs.dynamic_types[logtype].loglevel) > > return 0; > > > > Type used to be a mask, so for instance, RTE_LOGTYPE_HASH 0x0...40 =3D > 64 in decimal. > > Therefore, logtype =3D 64 >=3D 34 =3D rte_logs.dynamic_types_len), so t= his > won't be shown. > > However, the PMDs or EAL will show it, because their logtype is less th= an > 34. > > > > Am I missing something? >=20 > I think you are right. > We are mixing old logtype and new ones. > Should we redefine RTE_LOGTYPE_* values to the new values registered > in rte_log_init? I guess. I can send a patch for it and any concerns can be raised there? Pablo