DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Jerin Kollanukkaran <jerinj@marvell.com>
Cc: Olivier Matz <olivier.matz@6wind.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	dpdk-dev <dev@dpdk.org>,
	arybchenko@solarflare.com
Subject: Re: [dpdk-dev] rte_log simplification using constructor scheme
Date: Mon, 08 Jun 2020 22:25:23 +0200	[thread overview]
Message-ID: <2698909.XInfi7kW1d@thomas> (raw)
In-Reply-To: <BYAPR18MB24242A1618B1D210C736A9E1C8B10@BYAPR18MB2424.namprd18.prod.outlook.com>

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 feel rte_log_register() could be deprecated.

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



  reply	other threads:[~2020-06-08 20:25 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 [this message]
2020-06-17  6:40   ` Jerin Jacob

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=2698909.XInfi7kW1d@thomas \
    --to=thomas@monjalon.net \
    --cc=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=olivier.matz@6wind.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).