DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH 1/3] log: choose EAL log type on registration failure
Date: Tue, 23 Mar 2021 19:43:27 +0100	[thread overview]
Message-ID: <5444410.DN1dmMcrS1@thomas> (raw)
In-Reply-To: <CAJFAV8xc6v7NDgpbj0F2hMT8tWJ4fVX7RnzSMEpM29FkYKg1Kw@mail.gmail.com>

23/03/2021 19:22, David Marchand:
> On Wed, Mar 10, 2021 at 3:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > In the unlikely case where something goes wrong
> > while registering a log type,
> > the fallback is to use the log type 0, assigned to EAL.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
[...]
> >  {                                                                      \
> >         type = rte_log_register_type_and_pick_level(RTE_STR(name),      \
> >                                                     RTE_LOG_##level);   \
> > +       type = RTE_MAX(0, type);                                        \
> >  }
> 
> Hard to read and to grep, can we use explicit logtype?
> 
> if (type < 0)
>     type = RTE_LOGTYPE_EAL;

Yes I agree it is better because we can grep the explicit name.



  reply	other threads:[~2021-03-23 18:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 14:01 [dpdk-dev] [PATCH 0/3] cleanup drivers log registration Thomas Monjalon
2021-03-10 14:01 ` [dpdk-dev] [PATCH 1/3] log: choose EAL log type on registration failure Thomas Monjalon
2021-03-23 18:22   ` David Marchand
2021-03-23 18:43     ` Thomas Monjalon [this message]
2021-03-10 14:01 ` [dpdk-dev] [PATCH 2/3] drivers: fix log level after loading Thomas Monjalon
2021-03-23 18:25   ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-03-23 18:50   ` [dpdk-dev] " Ajit Khaparde
2021-03-10 14:01 ` [dpdk-dev] [PATCH 3/3] drivers: align log names Thomas Monjalon
2021-03-10 14:36   ` Bruce Richardson
2021-03-11  2:54   ` Xu, Rosen
2021-03-11  3:02   ` Wang, Xiao W
2021-03-12  7:39   ` Hemant Agrawal
2021-03-19 16:29   ` David Marchand
2021-03-19 17:14     ` Thomas Monjalon
2021-03-19 20:38       ` David Marchand
2021-03-19 16:53   ` Ajit Khaparde
2021-03-22 10:33   ` David Marchand
2021-04-05  9:52     ` Thomas Monjalon
2021-04-05 10:02 ` [dpdk-dev] [PATCH v2 0/3] " Thomas Monjalon
2021-04-05 10:02   ` [dpdk-dev] [PATCH v2 1/3] log: choose EAL log type on registration failure Thomas Monjalon
2021-04-06  9:17     ` David Marchand
2021-04-06  9:49       ` Thomas Monjalon
2021-04-05 10:03   ` [dpdk-dev] [PATCH v2 2/3] drivers: fix log level after loading Thomas Monjalon
2021-04-05 10:03   ` [dpdk-dev] [PATCH v2 3/3] drivers: align log names Thomas Monjalon
2021-04-06  1:19     ` Wang, Xiao W
2021-04-06  5:27     ` Xu, Rosen
2021-04-06  9:31       ` Thomas Monjalon
2021-04-06  9:48         ` Xu, Rosen
2021-04-07  0:49           ` Wang, Xiao W
2021-04-06  6:02     ` Min Hu (Connor)
2021-04-05 10:05   ` [dpdk-dev] [PATCH v2 0/3] " Thomas Monjalon
2021-04-06 13:22 ` [dpdk-dev] [PATCH v3 0/3] cleanup drivers log registration Thomas Monjalon
2021-04-06 13:22   ` [dpdk-dev] [PATCH v3 1/3] log: choose EAL log type on registration failure Thomas Monjalon
2021-04-07  8:17     ` Andrew Rybchenko
2021-04-06 13:22   ` [dpdk-dev] [PATCH v3 2/3] drivers: fix log level after loading Thomas Monjalon
2021-04-06 13:22   ` [dpdk-dev] [PATCH v3 3/3] drivers: align log names Thomas Monjalon
2021-04-08 16:43   ` [dpdk-dev] [PATCH v3 0/3] cleanup drivers log registration David Marchand

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=5444410.DN1dmMcrS1@thomas \
    --to=thomas@monjalon.net \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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).