[dpdk-dev] [PATCH 01/13] eal/log: introduce log register macro
Jerin Jacob
jerinjacobk at gmail.com
Wed Jun 24 15:11:53 CEST 2020
On Wed, Jun 17, 2020 at 3:51 PM Andrew Rybchenko
<arybchenko at solarflare.com> wrote:
>
> On 6/17/20 1:02 PM, David Marchand wrote:
> > On Wed, Jun 17, 2020 at 8:30 AM <jerinj at marvell.com> wrote:
> >>
> >> From: Jerin Jacob <jerinj at marvell.com>
> >>
> >> Introducing the RTE_LOG_REGISTER macro to avoid the code duplication
> >> in the log registration process.
> >>
> >> It is a wrapper macro for declaring the logtype, register the log and sets
> >
> > Having the logtype variable declared as part of the macro will force
> > us to have global symbols (for the cases where it is needed).
> > I'd rather leave the declaration to the caller, and only handle the
> > registering part in this macro.
>
> I agree with David that it is important to avoid global symbols
> when it is not needed.
David, Andrew,
Since it is executed in "constructor" context, it will be always from
the global variable. Right?
i.e DPDK is not yet initialized in when "constructor" being called.
In addition to that, It will be adding more lines of code in the
consumer of this MACRO.
Thoughts?
>
> >> it's level in the constructor context.
> >>
> >
> >
>
More information about the dev
mailing list