[dpdk-dev] rte_log simplification using constructor scheme
Jerin Jacob
jerinjacobk at gmail.com
Wed Jun 17 08:40:05 CEST 2020
On Tue, Jun 9, 2020 at 1:55 AM Thomas Monjalon <thomas at 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.
>
>
More information about the dev
mailing list