From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 6655C6A67 for ; Tue, 17 May 2016 17:57:04 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id n129so146447137wmn.1 for ; Tue, 17 May 2016 08:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AHmNtSrIx4ATkhq9quHVuthJclWNxST5a+scwyvCIOg=; b=qcWyP1jGdVS9mN6UUHD1X5NOzH5jM523ENiauxcmivfkExhXmyzkrAAiIoTn6QW6jL KMi95kbWDCWUBLN+UJVPX4BkwxYfn2QhwFBO3Hb77eU1is/ULwYJe7QWQPz9ZARErDBF FKJdNCdFFyvgYGJNee8hBaUwXJHHXBWM/tEgXZ+DfBvjuklKIzuojcsFNMV03DsVUv6Z H6LRaBu9J8ZlQDQIRQoBNGH37ogvmGGX78Z2mc35l7RsuG1sgDgnTRoTFqyF79CEBrcg gqDfPvJZTlnc5QsPuDlWEVv18Gd5Jfo3qNYxaUQcsFSjq+0Z7R9zA5GyoZ6MAZwAW86P /utQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AHmNtSrIx4ATkhq9quHVuthJclWNxST5a+scwyvCIOg=; b=HP8whssllspz3v7lXvdkwW4j6BLmHSNwRWKgMEMreCLh4i9S13u3aFai866R/VvzPG p2JWEPyhejgkizynoE5ODOL6frD2+qhajaVhvdT9DSlAXJdyKhetjSiIPEPx7HICTzSX Skk316lnBAEJSIXb0pH4xNpf8tGb4Tqr3GlPsuEdmV78h05D1JjpbH3jE9xMRT3+FHMp 8sXnD0bs+5MOhWtY499zOvOluDKRCsGUAt+5I+teGBz3IDlBnOG3WKesswM3UTnSnswh OxxLS0U0J67dR74l168NyWU2Yo2B6Z4mmX8kB/iI7jiyc7fOto68H7D9YwXv1rnHeZ5p kAUw== X-Gm-Message-State: AOPr4FU5IeuXelRtdF08hAfIY5JJKE8MFFevL6Lyu1m8T4e/QcD2hWuckfJ3S4TcI227KjvL9mBWRxKBkUlBeIJc X-Received: by 10.194.228.102 with SMTP id sh6mr2393952wjc.173.1463500624193; Tue, 17 May 2016 08:57:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.16.2 with HTTP; Tue, 17 May 2016 08:56:44 -0700 (PDT) In-Reply-To: <1462810416-6183-1-git-send-email-olivier.matz@6wind.com> References: <1462810416-6183-1-git-send-email-olivier.matz@6wind.com> From: David Marchand Date: Tue, 17 May 2016 17:56:44 +0200 Message-ID: To: Olivier Matz Cc: "dev@dpdk.org" , Maxime Leroy Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] eal: fix log level/type retrieving on a standard pthread X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2016 15:57:04 -0000 On Mon, May 9, 2016 at 6:13 PM, Olivier Matz wrote: > From: Maxime Leroy > > 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 -- David Marchand