From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 9F20F2BAD for ; Tue, 4 Oct 2016 10:28:41 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id p138so197442396wmb.1 for ; Tue, 04 Oct 2016 01:28:41 -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:content-transfer-encoding; bh=zXIQVmoQXC2rcnUDfkuY6ssoA1dmIOYsfPfwv9AUgn0=; b=GRZAlOZbCZ8HrV2QrQELZgwns1ufSBjFUvwlUYAQb2bWJBntxmbWRZwBQK1BQEvwEV G8EAZ2uCyRAsKyKEP1tZmTCeOxT/kRUg13Z6GoOuFf8ukxbBT+HsO49u4jnQxcEnyfVt iYj/kGrHp3k6srErmPdOfF7umcZTDqPxxHQ9eUxGllmCqo8sNL/4B25b5UlUM/FvXfIZ qTB1bjNgakloSR409VbeXlesnTq87EZX/Ub1T1gZpsIReL8GRaNkkBPczqTsL9saIFoU Uz0viDKEhLF8UouJ4/+MyKl8ZAp/n0yFNSIk0hR8MQWUtA7Ve+fO4zSxxYTqMoIBT97C 8tgw== 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:content-transfer-encoding; bh=zXIQVmoQXC2rcnUDfkuY6ssoA1dmIOYsfPfwv9AUgn0=; b=P1zDKuorJSDwE/PXZoDxwo/xywpQLn6yjGrhth+k1nGilV3GwT+VKMMOrJdIP4BJzR BBB63cM1grCJL4HtmL7IoGPAOhGrheO2t98Ec/0WO+3FylzEMG8fXPmeHkewTUkpyrg5 hxTeM7H+FwQyC4HJgoQbLscxOhz4siM91ZXHjgTuxlJRzPngs38D88YdA9XLUQziqRzh 69Q/41ZreRSAvtZZh6BTHmWG5JkjmBwKJKPOfzuuguXu/hp+q823wKK7jBYpEraVACWV pqUJyle8buvxzg/BJ3VZ3yhIdobKkjuUkxdl2A/PZ+1D1FnFA/hq9SBnrLFEaiacNCvE 5KTg== X-Gm-Message-State: AA6/9RlS07Dqo/pWZap53VIFKGtLEvU4U0qJn/G/vlQhEqcKFdN2E0WgadukApFAFZrTLCzYWa/8wLYcXOPYTBej X-Received: by 10.28.191.85 with SMTP id p82mr8672458wmf.33.1475569721235; Tue, 04 Oct 2016 01:28:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.130 with HTTP; Tue, 4 Oct 2016 01:28:20 -0700 (PDT) In-Reply-To: <036D8827-DFD7-421D-8133-3011D42CEAB4@intel.com> References: <1474011832-29987-1-git-send-email-olivier.matz@6wind.com> <2969629.OOuc7vtRSA@xps13> <104cb490-b39a-58e6-2031-d99e023474f2@6wind.com> <036D8827-DFD7-421D-8133-3011D42CEAB4@intel.com> From: David Marchand Date: Tue, 4 Oct 2016 10:28:20 +0200 Message-ID: To: "Wiles, Keith" Cc: Olivier Matz , Thomas Monjalon , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] log: do not drop debug logs at compile time 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, 04 Oct 2016 08:28:41 -0000 On Mon, Oct 3, 2016 at 6:27 PM, Wiles, Keith wrote: >> On Oct 3, 2016, at 10:37 AM, Olivier Matz wrote= : >> What makes you feel it's easier to add a log level instead of adding a >> new RTE_LOG_DP() function? > > It seems to me the log levels are for displaying logs at different levels= adding a new macro to not log is just a hack because we do not have a log = level for data path. This is why I would like to see a log level added and = not a new macro. > > It also appears the new RTE_LOG() will always be in the code as you moved= the test to the RTE_LOG_DP() macro. This would mean all RTE_LOG() in the c= ode will always call rte_log(), correct? > > If using a new DEBUG_DP (maybe DATAPATH is a better log level name) level= we can use the same macro as before and modify the level only. This way we= can remove via the compiler any log that is below the default RTE_LOG_LEVE= L. I see keeping the rte_log() could be a performance problem or code blot = when you really want to remove them all. > > The DATAPATH log level would be above (smaller number) then DEBUG in the = enum list. To remove all debug logs just set the RTE_LOG_LEVEL to RTE_LOG_D= ATAPATH. If I try to draw a parrallel to syslog (well, the log subsystem in eal has always been bound to syslog ...), what you propose here is like adding a new level in syslog while you have syslog facilities. With the current log api, we have types and levels, can't we filter at build time depending on the log "type" ? Here we would strip PMD type logs > INFO. --=20 David Marchand