From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 383A9A0520; Fri, 26 Jun 2020 18:56:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61F691BEE3; Fri, 26 Jun 2020 18:56:38 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D03651BEDD for <dev@dpdk.org>; Fri, 26 Jun 2020 18:56:36 +0200 (CEST) IronPort-SDR: F25wsXWa35Uf2Pmozz6DBe3fQ1lxUWEeoGtqn9kpUBlBMH9bGk/EM+UeMWY27t6POp9XahpW49 2b8i+DZOe/zw== X-IronPort-AV: E=McAfee;i="6000,8403,9664"; a="145465317" X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="145465317" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2020 09:56:35 -0700 IronPort-SDR: yGNGuvfX3pU18clR/0NNSrWJsuDjbFoPBCNe+lURKx58EVleoLESmQzx9LUdvrpXQ6tNbTIY3X 2DzfCXDKF3aA== X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="453420217" Received: from mjjankow-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.251.82.49]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Jun 2020 09:56:33 -0700 Date: Fri, 26 Jun 2020 17:56:30 +0100 From: Bruce Richardson <bruce.richardson@intel.com> To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> Cc: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org Message-ID: <20200626165630.GA564@bricha3-MOBL.ger.corp.intel.com> References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> <20200422214555.11837-1-l.wojciechow@partner.samsung.com> <CGME20200422214614eucas1p1044184e60bcb04469783ef0dd95091c1@eucas1p1.samsung.com> <20200422214555.11837-2-l.wojciechow@partner.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422214555.11837-2-l.wojciechow@partner.samsung.com> Subject: Re: [dpdk-dev] [PATCH v2 1/3] config: introduce global rte debug flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> On Wed, Apr 22, 2020 at 11:45:53PM +0200, Lukasz Wojciechowski wrote: > A new boolean meson build flag is introduced with this patch: rte_debug. > To enable this option add -Drte_debug=true to the meson configure command. > > By enabling this flag the globaly defined macro RTE_DEBUG becomes > defined. It should be used for enabling debug code in all dpdk project > components. Using this flag allows to make additional checks or tests > and provide additional logs even in performance sensitive parts of code. > > The flag is disabled by default. > > Additionally for all enabled to be built libraries > a RTE_DEBUG_{library name} is defined and assigned a value 1. > This standardize names of library specific debug macros. Those can > be used also without rte_debug option by using CFLAGS="-D..." build > parameter. > > Code put inside RTE_DEBUG* #ifdef sections should be also put inside > if (rte_log_can_log(...)) condition to allow run-time filtering of > sanity checks, validations, logs and dumps when using rte_debug option. > > Libraries will be adjusted to the change in separate patches. > > Suggested-by: Bruce Richardson <bruce.richardson@intel.com> > Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> The drivers are missing debug flag options, which probably need to be defined as <driver_type>_<driver_name> e.g. RTE_DEBUG_NET_I40E, RTE_DEBUG_EVENT_SW, etc. However, this is definitely a good start. Reviewed-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>