From: David Marchand <david.marchand@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [PATCH] mbuf: replace RTE_LOGTYPE_MBUF with dynamic type
Date: Tue, 7 Feb 2023 17:41:24 +0100 [thread overview]
Message-ID: <CAJFAV8wzzm8wmuiis9x_+_E9SshK+nSGg82gdZL2cvMnq5qJpw@mail.gmail.com> (raw)
In-Reply-To: <20230207081932.1c5836d6@hermes.local>
On Tue, Feb 7, 2023 at 5:19 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Tue, 7 Feb 2023 09:34:13 +0100
> David Marchand <david.marchand@redhat.com> wrote:
>
> > Why do we need a new naming convention?
> > Please use RTE_LOG_REGISTER_DEFAULT.
>
> Should be use RTE_LOG_REGISTER_SUFFIX( ) with "mbuf"
RTE_LOG_REGISTER_DEFAULT() hooks the logtype handle you pass to an
automatic RTE_LOG_DEFAULT_LOGTYPE name based on location in the tree
(generated by the build framework).
#define RTE_LOG_REGISTER_IMPL(type, name, level) \
int type; \
RTE_INIT(__##type) \
{ \
type = rte_log_register_type_and_pick_level(name, RTE_LOG_##level); \
if (type < 0) \
type = RTE_LOGTYPE_EAL; \
}
#define RTE_LOG_REGISTER_DEFAULT(type, level) \
RTE_LOG_REGISTER_IMPL(type, RTE_STR(RTE_LOG_DEFAULT_LOGTYPE), level)
When compiling:
[4/5] ccache cc -Ilib/librte_mbuf.a.p -Ilib -I../lib -Ilib/mbuf
-I../lib/mbuf -I. -I.. -Iconfig -I../config -Ilib/eal/include
-I../lib/eal/include -Ilib/eal/linux/include
-I../lib/eal/linux/include -Ilib/eal/x86/include
-I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common
-Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/metrics
-I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mempool
-I../lib/mempool -Ilib/ring -I../lib/ring -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O2 -g
-include rte_config.h -Wcast-qual -Wdeprecated -Wformat
-Wformat-nonliteral -Wformat-security -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition
-Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned
-Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE
-Wno-error=array-bounds -DRTE_LIBRTE_BBDEV_DEBUG
-DRTE_LIBRTE_EVENTDEV_DEBUG -DRTE_LIBRTE_IEEE1588 -fPIC -march=corei7
-DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation
-DRTE_LOG_DEFAULT_LOGTYPE=lib.mbuf -MD -MQ
lib/librte_mbuf.a.p/mbuf_rte_mbuf.c.o -MF
lib/librte_mbuf.a.p/mbuf_rte_mbuf.c.o.d -o
lib/librte_mbuf.a.p/mbuf_rte_mbuf.c.o -c ../lib/mbuf/rte_mbuf.c
RTE_LOG_REGISTER_SUFFIX() may be used to define "sub" logtypes, like
if you needed lib.mbuf.foo.
--
David Marchand
prev parent reply other threads:[~2023-02-07 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 17:39 Stephen Hemminger
2023-02-07 8:24 ` Morten Brørup
2023-02-07 8:34 ` David Marchand
2023-02-07 16:19 ` Stephen Hemminger
2023-02-07 16:41 ` David Marchand [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=CAJFAV8wzzm8wmuiis9x_+_E9SshK+nSGg82gdZL2cvMnq5qJpw@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=stephen@networkplumber.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).