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

Liang, Cunming cunming.liang at intel.com
Tue Feb 10 03:56:06 CET 2015



> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz at 6wind.com]
> Sent: Tuesday, February 10, 2015 1:45 AM
> To: Liang, Cunming; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 11/17] log: fix the gap to support non-EAL
> thread
> 
> 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?
[LCM] Will be in 2.1 I suppose, together with the patch for mempool cache to support non-EAL thread.




More information about the dev mailing list