From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 5451E2C27 for ; Wed, 12 Apr 2017 16:06:45 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id w64so88929187wma.0 for ; Wed, 12 Apr 2017 07:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=AFOvAms3aZTwu8hPlHe3aYuNg2EAF6hRk6Ru0n3+MbE=; b=kErq9XTOgIgPPRIkNUgVS+AEEuUhapIzPNIjbZ12SkLVlg56C8wGMg4YHhzFfrgBYi QtOjz2zDA1A958VQD+75psUszzUKPk6DCeDlOyL8OE8yNTdbAVPqaNY6n8JaKqAgKXpF Ay7KAEb0rNo3O/66gYSpDcMFz9AhE3JkAX74auapRQbK1uejvYZi+2EXA+elXiO2cizA Nmt/lQDkB1ymV0J2zlLrsV+/8OYk3HkmHVbPplQW59Xe4fSrfXmjHR768eyli+XAgQVy LgU3WD6PEWCPoVZUbzpI/49JarzVM54onhNTvHJ2o7HI4Dccxxt+l5+tysajMYBI6OrF C7gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=AFOvAms3aZTwu8hPlHe3aYuNg2EAF6hRk6Ru0n3+MbE=; b=Eew0vbE/XeMqxjXZSTndeaMnRSl6ZV2BZKBFz5PaUX5agnlhqB3sHMkIErT2FuyHSF Pj9PoQodas/eCm3Rk9Wc7PDvzVuqgD5/0z0GfyjgA4AtcxlHgU3KlwgtgAnB/k2X+bgx Krnnx1rbZ5ES2nC/KLNRzTStVRPj4iv38H8VT+LS9wNF13AQuWB+9N2F72dq6E8Tv3s0 O7ss87mIc3poJSoaTa5RjbLchZuhVBYt0zWW/E0Kn9eBtyVlYHkp2e4hx+UahmlwY1mC BOAYDlEHWT8RoWat2bVcbp0qYVQnKHHlf0L5cpBS8RDhCAsfYN0/OVD8vTLWSlOTHhZf v7pA== X-Gm-Message-State: AN3rC/4bBo0iEBLYjF/aqL5f6YnBevrllW0/nUcMAmZIs5H1XYBwXm0QfZMPYDWHJSarSDH5 X-Received: by 10.28.217.136 with SMTP id q130mr2930073wmg.132.1492006004994; Wed, 12 Apr 2017 07:06:44 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id o9sm6762490wmd.4.2017.04.12.07.06.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 07:06:44 -0700 (PDT) From: Thomas Monjalon To: "De Lara Guarch, Pablo" Cc: Olivier Matz , dev@dpdk.org Date: Wed, 12 Apr 2017 16:06:43 +0200 Message-ID: <10891620.PEh5KuCkm4@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <20170329155323.4760-1-olivier.matz@6wind.com> <1731928.s789XWeaOP@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 14:06:45 -0000 2017-04-12 13:47, De Lara Guarch, Pablo: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 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 specific > > > > > > 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 assume > > 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 >= 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 = > > 64 in decimal. > > > Therefore, logtype = 64 >= 34 = rte_logs.dynamic_types_len), so this > > won't be shown. > > > However, the PMDs or EAL will show it, because their logtype is less than > > 34. > > > > > > Am I missing something? > > > > 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? OK, thank you