From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix log level/type retrieving on a standard pthread Date: Wed, 18 May 2016 16:50:09 +0200 Message-ID: <2273011.xczdiDXzv8@xps13> References: <1462810416-6183-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, David Marchand , Olivier Matz To: Maxime Leroy Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 8DB12377C for ; Wed, 18 May 2016 16:50:43 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id r12so38633179wme.0 for ; Wed, 18 May 2016 07:50:43 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > 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 > > Signed-off-by: Olivier Matz > > Acked-by: David Marchand Applied, thanks