DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Jerin Kollanukkaran <jerinj@marvell.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	 "david.marchand@redhat.com" <david.marchand@redhat.com>,
	dpdk-dev <dev@dpdk.org>,
	Andrew Rybchenko <arybchenko@solarflare.com>
Subject: Re: [dpdk-dev] rte_log simplification using constructor scheme
Date: Wed, 17 Jun 2020 12:10:05 +0530	[thread overview]
Message-ID: <CALBAE1PPgoaDZJK=e=mTrNaKzUe18aoiGhWWvoVw9Z1oaNt16g@mail.gmail.com> (raw)
In-Reply-To: <2698909.XInfi7kW1d@thomas>

On Tue, Jun 9, 2020 at 1:55 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 27/05/2020 18:05, Jerin Kollanukkaran:
> > +#define RTE_LOG_REGISTER(type, name, level)                            \
> > +int type;                                                              \
> > +RTE_INIT(__##type)                                                     \
> > +{                                                                      \
> > +       type = rte_log_register(RTE_STR(name));                         \
> > +       if (type >= 0)                                                  \
> > +               rte_log_set_level(type, RTE_LOG_##level);               \
> > +}
>
> We should consider using rte_log_register_type_and_pick_level()
> which works for drivers loaded later in the init sequence.

I sent the first version[1] based on the current driver usage to avoid
any behavior change. (Major work is changing the drivers, we can
decide the RTE_LOG_REGISTER definition in next versions)
[1]
http://patches.dpdk.org/patch/71650/
I will send the v2 based on the consensus.
Please comment on http://patches.dpdk.org/patch/71650/.

> I feel rte_log_register() could be deprecated.

No strong opinion on this. @Olivier Matz , Thoughts?

> The other question around log level is about the default level.
> Do we want to allow having different default log levels per log type?

Currently, drivers are using various levels per log type. I can send
the v2 based on
the consensus.


>
>

      reply	other threads:[~2020-06-17  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 16:05 Jerin Kollanukkaran
2020-06-08 20:25 ` Thomas Monjalon
2020-06-17  6:40   ` Jerin Jacob [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='CALBAE1PPgoaDZJK=e=mTrNaKzUe18aoiGhWWvoVw9Z1oaNt16g@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    /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).