[dpdk-dev] [PATCH] eal: fix log level/type retrieving on a standard pthread

David Marchand david.marchand at 6wind.com
Tue May 17 17:56:44 CEST 2016


On Mon, May 9, 2016 at 6:13 PM, Olivier Matz <olivier.matz at 6wind.com> wrote:
> From: Maxime Leroy <maxime.leroy at 6wind.com>
>
> The functions rte_log_cur_msg_loglevel() and rte_log_cur_msg_logtype()
> return the current log level/type for the message being processed. They
> are used when implementing a user-defined logging stream.
>
> The current log levels and types were stored in a table indexed by the
> lcore_id, only returning a valid value for dataplane threads. Setting
> and getting these values in a non dataplane thread was ignored, using
> the global value instead.
>
> To fix this issue, a per-thread variable could be used (with
> RTE_DEFINE_PER_LCORE), allowing any pthread to set and retrieve its
> current log level or type.
>
> Signed-off-by: Maxime Leroy <maxime.leroy at 6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>

Acked-by: David Marchand <david.marchand at 6wind.com>

-- 
David Marchand


More information about the dev mailing list