From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06C59C433DF for ; Fri, 26 Jun 2020 16:56:40 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id A2830207E8 for ; Fri, 26 Jun 2020 16:56:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2830207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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 ; 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 To: Lukasz Wojciechowski Cc: Thomas Monjalon , 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> <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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Signed-off-by: Lukasz Wojciechowski The drivers are missing debug flag options, which probably need to be defined as _ e.g. RTE_DEBUG_NET_I40E, RTE_DEBUG_EVENT_SW, etc. However, this is definitely a good start. Reviewed-by: Bruce Richardson Acked-by: Bruce Richardson