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 4E64CA0520;
	Fri, 26 Jun 2020 19:00:18 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 8F1C71BEDD;
	Fri, 26 Jun 2020 19:00:17 +0200 (CEST)
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id EF4FB1BECF
 for <dev@dpdk.org>; Fri, 26 Jun 2020 19:00:14 +0200 (CEST)
IronPort-SDR: l5c2bUsAxJ6AAlG9upb5Mi3zJ2JgaRCozNocXJre8bMn1YDzErwZQRvxo8Y2Fg/BnKMsT8ao6S
 RI96l1bpcN/Q==
X-IronPort-AV: E=McAfee;i="6000,8403,9664"; a="146901902"
X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="146901902"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 26 Jun 2020 10:00:13 -0700
IronPort-SDR: aSyAtDZSNz0zmCO9dgAf7kPWpHBvbZAzupdFP0Qf4BiA4WUtzk7PIjsVA/y5WgIP1+EE8aWjz3
 AET9/0lkHifQ==
X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="453421257"
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 10:00:11 -0700
Date: Fri, 26 Jun 2020 18:00:07 +0100
From: Bruce Richardson <bruce.richardson@intel.com>
To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Cc: Olivier Matz <olivier.matz@6wind.com>,
 Thomas Monjalon <thomas@monjalon.net>,
 John McNamara <john.mcnamara@intel.com>,
 Marko Kovacevic <marko.kovacevic@intel.com>, dev@dpdk.org
Message-ID: <20200626170007.GC564@bricha3-MOBL.ger.corp.intel.com>
References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com>
 <20200422214555.11837-1-l.wojciechow@partner.samsung.com>
 <CGME20200422214615eucas1p2a50ce20695a77b5b2888fd4521296094@eucas1p2.samsung.com>
 <20200422214555.11837-4-l.wojciechow@partner.samsung.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200422214555.11837-4-l.wojciechow@partner.samsung.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/3] mbuf: standardize library 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:55PM +0200, Lukasz Wojciechowski wrote:
> Use standardized debug macro RTE_DEBUG_MBUF instead of
> RTE_LIBRTE_MBUF_DEBUG for wrapping sanity checks.
> 
> Add runtime control of running sanity checks basing on
> rte_log_can_log() function.
> 
> To run mbuf sanity checks all following conditions must occur:
> 1) RTE_DEBUG_MBUF - must be defined, this can be done by enabling meson
>     rte_debug option or defining CFLAGS="-DRTE_DEBUG_MBUF"
> 2) global log level must be set to RTE_LOG_DEBUG
> 3) mbuf library logtype log level (lib.mbuf) must be set to RTE_LOG_DEBUG
> 
> Tests and documentation were also updated.
> 
> Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> ---
>  app/test/test_mbuf.c               |  3 ++-
>  config/common_base                 |  1 -
>  doc/guides/prog_guide/mbuf_lib.rst |  2 +-
>  lib/librte_mbuf/rte_mbuf.h         | 12 ++++++++----
>  4 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
> index 8200b4f71..b7b956659 100644
> --- a/app/test/test_mbuf.c
> +++ b/app/test/test_mbuf.c
> @@ -994,7 +994,8 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool)
>  /*
>   * Stress test for rte_mbuf atomic refcnt.
>   * Implies that RTE_MBUF_REFCNT_ATOMIC is defined.
> - * For more efficiency, recommended to run with RTE_LIBRTE_MBUF_DEBUG defined.
> + * For more efficiency, recommended to run with RTE_DEBUG_MBUF defined
> + * or using rte_debug meson build option.
>   */
>  
>  #ifdef RTE_MBUF_REFCNT_ATOMIC
> diff --git a/config/common_base b/config/common_base
> index 38c5ada26..80fa3281f 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -859,7 +859,6 @@ CONFIG_RTE_LIBRTE_OCTEONTX2_MEMPOOL=y
>  # Compile librte_mbuf
>  #
>  CONFIG_RTE_LIBRTE_MBUF=y
> -CONFIG_RTE_LIBRTE_MBUF_DEBUG=n

This provides no "standard" way to enable the debug options with make,
right? I think that is perhaps a step too far. Two options I see:
* Rather than dropping this flag, it could be converted inside the mbuf
  library (maybe the makefile) to the new version
* Replace this macro with CONFIG_RTE_DEBUG_MBUF

What do you think?

/Bruce