DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: Olivier Matz <olivier.matz@6wind.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs
Date: Wed, 12 Apr 2017 16:06:43 +0200	[thread overview]
Message-ID: <10891620.PEh5KuCkm4@xps13> (raw)
In-Reply-To: <E115CCD9D858EF4F90C690B0DCB4D89747808D84@IRSMSX108.ger.corp.intel.com>

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

      reply	other threads:[~2017-04-12 14:06 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 13:29 [dpdk-dev] [RFC " Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 1/8] eal: support dynamic log types Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 2/8] eal: dump registered " Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 3/8] eal: change several log levels matching a regexp Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 4/8] eal: change specific log levels at startup Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 5/8] eal: deprecate log functions Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 6/8] app/test: new command to dump log types Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 7/8] app/testpmd: " Olivier Matz
2017-02-06 13:29 ` [dpdk-dev] [RFC 8/8] net/i40e: use dynamic log type for control logs Olivier Matz
2017-02-06 13:49 ` [dpdk-dev] [RFC 0/8] eal: dynamic logs Bruce Richardson
2017-02-06 14:10   ` Olivier Matz
2017-02-06 15:01     ` Wiles, Keith
2017-02-06 15:27       ` Olivier Matz
2017-02-06 15:55         ` Wiles, Keith
2017-02-06 16:18           ` Olivier Matz
2017-02-06 17:57             ` Wiles, Keith
2017-03-15 16:35 ` Thomas Monjalon
2017-03-17 15:32   ` Olivier Matz
2017-03-17 15:51 ` [dpdk-dev] [PATCH " Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 1/8] eal: support dynamic log types Olivier Matz
2017-03-17 16:13     ` Stephen Hemminger
2017-03-17 16:14     ` Stephen Hemminger
2017-03-17 16:15     ` Stephen Hemminger
2017-03-17 16:40       ` Olivier Matz
2017-03-17 16:17     ` Stephen Hemminger
2017-03-17 15:51   ` [dpdk-dev] [PATCH 2/8] eal: dump registered " Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 3/8] eal: change several log levels matching a regexp Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 4/8] eal: change specific log levels at startup Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 5/8] eal: deprecate log functions Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 6/8] app/test: new command to dump log types Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 7/8] app/testpmd: " Olivier Matz
2017-03-17 15:51   ` [dpdk-dev] [PATCH 8/8] net/i40e: use dynamic log type for control logs Olivier Matz
2017-03-29 15:53   ` [dpdk-dev] [PATCH v2 0/8] eal: dynamic logs Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 1/8] eal: support dynamic log types Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 2/8] eal: dump registered " Olivier Matz
2017-04-04  9:01       ` Thomas Monjalon
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 3/8] eal: change several log levels matching a regexp Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 4/8] eal: change specific log levels at startup Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 5/8] eal: deprecate log functions Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 6/8] app/test: new command to dump log types Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 7/8] app/testpmd: " Olivier Matz
2017-03-29 15:53     ` [dpdk-dev] [PATCH v2 8/8] net/i40e: use dynamic log type for control logs Olivier Matz
2017-04-04 16:40     ` [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 1/8] eal: support dynamic log types Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 2/8] eal: dump registered " Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 3/8] eal: change several log levels matching a regexp Olivier Matz
2017-04-14  5:40         ` Tan, Jianfeng
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 4/8] eal: change specific log levels at startup Olivier Matz
2017-04-14  5:33         ` Tan, Jianfeng
2017-04-18  8:50           ` Olivier MATZ
2017-04-18 11:15             ` Tan, Jianfeng
2017-04-18 11:56               ` Olivier MATZ
2017-04-14 15:32         ` Ferruh Yigit
2017-04-18  8:02           ` Olivier MATZ
2017-04-14 15:40         ` Ferruh Yigit
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 5/8] eal: deprecate log functions Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 6/8] app/test: new command to dump log types Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 7/8] app/testpmd: " Olivier Matz
2017-04-04 16:40       ` [dpdk-dev] [PATCH v3 8/8] net/i40e: use dynamic log type for control logs Olivier Matz
2017-04-05 11:50       ` [dpdk-dev] [PATCH v3 0/8] eal: dynamic logs Thomas Monjalon
2017-04-12  9:26       ` De Lara Guarch, Pablo
2017-04-12 10:37         ` Thomas Monjalon
2017-04-12 13:11           ` De Lara Guarch, Pablo
2017-04-12 13:29             ` Thomas Monjalon
2017-04-12 13:47               ` De Lara Guarch, Pablo
2017-04-12 14:06                 ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10891620.PEh5KuCkm4@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).