[dpdk-dev] [PATCH v4 11/17] log: fix the gap to support non-EAL thread

Olivier MATZ olivier.matz at 6wind.com
Mon Feb 9 18:44:48 CET 2015


Hi,

On 02/09/2015 03:19 PM, Liang, Cunming wrote:
>>> --- a/lib/librte_eal/common/include/rte_log.h
>>> +++ b/lib/librte_eal/common/include/rte_log.h
>>> @@ -144,6 +144,11 @@ uint32_t rte_get_log_level(void);
>>>  void rte_set_log_type(uint32_t type, int enable);
>>>
>>>  /**
>>> + * Get the global log type.
>>> + */
>>> +uint32_t rte_get_log_type(void);
>>> +
>>> +/**
>>>   * Get the current loglevel for the message being processed.
>>>   *
>>>   * Before calling the user-defined stream for logging, the log
>>>
>>
>> Wouldn't it be better to change the variable:
>> static struct log_cur_msg log_cur_msg[RTE_MAX_LCORE];
>> into a pthread (tls) variable?
>>
>> With your patch, the log level and log type are not saved for
>> non-EAL threads. If TLS were used, I think it would work in any case.
> [LCM] Good point. But for this patch set, still suppose not involve big impact to EAL thread.
> For improve non-EAL thread, we'll have a separate patch set for it.

OK, that's fine

Will it be for 2.0 or later?



More information about the dev mailing list