From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7570EA0597; Thu, 9 Apr 2020 12:14:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DBF461C20A; Thu, 9 Apr 2020 12:14:54 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 657DB1C1CA; Thu, 9 Apr 2020 12:14:53 +0200 (CEST) IronPort-SDR: 3qKyTjjvyFPD6nl3ITAebsoqJk65xfzK2g2DUtYEGKROXYI5xR5rkfaIwgtyXVaeiR9+iLNEtJ wZ+OrMZcUX6w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 03:14:52 -0700 IronPort-SDR: 81mPUKSNtbgPV41jZpmdnwCCKt9qxgEBl+H8iv1RlWEu85Q5xKfZprRHKLVBnpxfJ2Wt0x8BnP JrehDjlGj59w== X-IronPort-AV: E=Sophos;i="5.72,362,1580803200"; d="scan'208";a="425461155" Received: from nakelly4-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.62.202]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 09 Apr 2020 03:14:49 -0700 Date: Thu, 9 Apr 2020 11:14:45 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: Lukasz Wojciechowski , Anoob Joseph , Akhil Goyal , Declan Doherty , Aviad Yehezkel , Boris Pismenny , Radu Nicolau , Anoob Joseph , "dev@dpdk.org" , "stable@dpdk.org" Message-ID: <20200409101445.GA613@bricha3-MOBL.ger.corp.intel.com> References: <20200312151654.7218-1-l.wojciechow@partner.samsung.com> <827f9660-dd8e-8440-c8b0-d34064ffdffe@partner.samsung.com> <2333397.jE0xQCEvom@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2333397.jE0xQCEvom@thomas> Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 01/13] security: fix verification of parameters 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 08, 2020 at 07:51:35PM +0200, Thomas Monjalon wrote: > 08/04/2020 17:49, Lukasz Wojciechowski: > > Hi guys, > > > > I don't know what is the current status of "legacy" build using > > gnumakes, so I added the new DEBUG flag to config just as it was done in > > other libs like eventdev. > > Many guides still point config files as the one that should be changed > > in order to enable some features, so I thought I should add it there. > > > > If I understand well the official build system now is the one based on > > using meson and ninja, however it hasn't got anything similar to the > > gnamakefiles system, e.g. > > in the meson.build file for libraries all the libraries have build > > variable set to true and there are few ifs that check it, but as it's > > set to true all libraries build always. > > And each library considered there defines RTE_LIBRTE_[LIBRARY_NAME]. > > It's kind of weird. > > > > foreach l:libraries > > * build = true** > > * reason = '' # set if build == false to explain why > > ... > > * if not build* > > dpdk_libs_disabled += name > > set_variable(name.underscorify() + '_disable_reason', reason) > > else > > enabled_libs += name > > *dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)* > > ... > > > > Have you think about reusing config files in meson configuration and > > have a single point of configuration? Of course all meson flags can > > overwrite the default config. > > This is on purpose. > We are removing most of compile-time options with meson. > > I think we can use a global option for debug-specific code. > Bruce, what do you recommend? > Meson has a built-in global debug setting which could be used. However, that may be too course-grained. If that is the case there are a couple of options: 1 Each library can have it's own debug flag defined, which is set on the commandline in CFLAGS. Can be done right now - just reuse any of the debug variables in the existing make config files (stripping off the CONFIG_), e.g. CFLAGS=-DRTE_MALLOC_DEBUG 2 Since that is perhaps not the most usable - though easiest to implement - we can look to add a general debug option (or couple of options) in meson, e.g. debug_libs=, debug_drivers=, where each option takes a list of libs or drivers to pass the debug flags to. This will require a little work in the meson build infrastructure, but is not that hard. The harder part is standardizing the debug flags across all components. The advantage of #1 is that it works today and just needs some documentation for each lib/driver what it's debug flags are. The advantage of #2 is more usability, but it requires a lot more work to standardize IMHO. /Bruce