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 C584AA0597 for ; Thu, 9 Apr 2020 16:07:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71C2A1C257; Thu, 9 Apr 2020 16:07:12 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id F303A1C257 for ; Thu, 9 Apr 2020 16:07:10 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200409140710euoutp0299b34e33e3c7ef9f964ed0a8098aefc0~EK_S0eIMl0449904499euoutp02J for ; Thu, 9 Apr 2020 14:07:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200409140710euoutp0299b34e33e3c7ef9f964ed0a8098aefc0~EK_S0eIMl0449904499euoutp02J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586441230; bh=C5D34pskx6j1C3v3o/C1dLTu+Jmr2xq5PU546XBayVI=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=tT5vjrt3R+WUBNeeaYzcuQ5ek1Ds9VPwp0Px81gC8a27jmWot41sLG3iEtnsnjQFm 0D4V3ktLEPHNWEt4mCN048E/AFF7mI5pY9mIeo5/3veP3LEfGNvTlqiBlvJz7gk12H djx2crz5GEEegh+CvaKDQoztgdjtqBUpf3jZ8Vr0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200409140709eucas1p1a2b88492404892b7297be504c3e9369e~EK_SrAk0t0715407154eucas1p1l; Thu, 9 Apr 2020 14:07:09 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C3.2F.61286.D0C2F8E5; Thu, 9 Apr 2020 15:07:09 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200409140709eucas1p1e140f38f82187c48401b83987e9815aa~EK_SUqOtz0715407154eucas1p1k; Thu, 9 Apr 2020 14:07:09 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200409140709eusmtrp29cf102928d31a669ac0f7d01e3b55664~EK_STocLx1304313043eusmtrp2_; Thu, 9 Apr 2020 14:07:09 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-d1-5e8f2c0dc1c1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id FF.77.08375.D0C2F8E5; Thu, 9 Apr 2020 15:07:09 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200409140708eusmtip2dc518e7a0b3e93851ca11e4daa9379de~EK_RZ9dWK0444504445eusmtip2h; Thu, 9 Apr 2020 14:07:08 +0000 (GMT) To: Bruce Richardson , Thomas Monjalon Cc: Anoob Joseph , Akhil Goyal , Declan Doherty , Aviad Yehezkel , Boris Pismenny , Radu Nicolau , Anoob Joseph , "dev@dpdk.org" , "stable@dpdk.org" From: Lukasz Wojciechowski Message-ID: Date: Thu, 9 Apr 2020 16:07:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200409111324.GC613@bricha3-MOBL.ger.corp.intel.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBKsWRmVeSWpSXmKPExsWy7djP87q8Ov1xBv/m6FusPzOP0eLU7Q/M Fsu2bGWy+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DtseFEP6vH rwVLWT0W73nJ5DF54UVmj2fTDzN5HLs5jd1j47sdTAHsUXo2RfmlJakKGfnFJbZK0YYWRnqG lhZ6RiaWeobG5rFWRqZK+nY2Kak5mWWpRfp2CXoZje8bmQu61Svetc9naWD8KdfFyMkhIWAi cXXiatYuRi4OIYGljBLPX98AcjiAEjISHy4JQNQIS/y51sUGYgsJvGaUuHW5DMQWFoiV+LJ8 HiOILSIQJbGo7SwriM0s8JRJYv4+doj640wSe28xgdhsArYSR2Z+BavhFXCTaJ6wjgVkFYuA ikTnFxOQsCjQyP7m3YwQJYISJ2c+YQGxOQWcJbbc2ssCMd5MYt7mh8wQtrxE89bZULaIxI1H LYwTGIVmIWmfhaRlFpKWWUhaFjCyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/dxAiM1G3Hfm7e wXhpY/AhRgEORiUeXgOG/jgh1sSy4srcQ4wSHMxKIrzeTb1xQrwpiZVVqUX58UWlOanFhxhN gX6byCwlmpwPTCJ5JfGGpobmFpaG5sbmxmYWSuK8HQIHY4QE0hNLUrNTUwtSi2D6mDg4pRoY Vbec36e63E8v9rzZvNWyBcnub7YdT83Ra1xnFvuDMdCyn2lNBM+rFYcmnlmi/f6SVxX/561p 9o3Nsp5Bi8Ve1q2WSwp7t/Cg124xv+9blmzUOG2+NV6d47PZT62kjgOu3WqpsSnlpoVpa7Zb vOhXkMjZtp6xZc33sjdWc4+z7krg+9TF+2iTEktxRqKhFnNRcSIA1SpFjOoCAAA= X-CMS-MailID: 20200409140709eucas1p1e140f38f82187c48401b83987e9815aa X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200409111335eucas1p1997192d7da7d72562ac7787670a15916 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200409111335eucas1p1997192d7da7d72562ac7787670a15916 References: <20200312151654.7218-1-l.wojciechow@partner.samsung.com> <2333397.jE0xQCEvom@thomas> <20200409101445.GA613@bricha3-MOBL.ger.corp.intel.com> <22404743.ouqheUzb2q@thomas> <20200409111324.GC613@bricha3-MOBL.ger.corp.intel.com> Subject: Re: [dpdk-stable] [EXT] Re: [dpdk-dev] [PATCH v2 01/13] security: fix verification of parameters X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" W dniu 09.04.2020 o 13:13, Bruce Richardson pisze: > On Thu, Apr 09, 2020 at 12:54:10PM +0200, Thomas Monjalon wrote: >> 09/04/2020 12:14, Bruce Richardson: >>> 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. >> In this case, we need a general option as the one already provided by meson. >> It means: "I am not in production, I want to see anything behaving wrong >> in the datapath." >> "Anything" means we don't need a per-library switch. >> And for the other needs (out of fast path), we have a new function: >> rte_log_can_log(mylogtype, RTE_LOG_DEBUG) >> > To use the general option in meson something like below is probably all > that is needed to flag the debug build to all components: > > diff --git a/config/meson.build b/config/meson.build > index 49482091d..b01cd1251 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -176,6 +176,10 @@ endif > # add -include rte_config to cflags > add_project_arguments('-include', 'rte_config.h', language: 'c') > > +if get_option('debug') > + add_project_arguments('-DDEBUG', language: 'c') > +endif > + This will conflict with DEBUG define for log level. How about adding similar define in library meson.build file? , e.g diff --git a/lib/librte_security/meson.build b/lib/librte_security/meson.build index 5679c8b5c..ee92483c5 100644 --- a/lib/librte_security/meson.build +++ b/lib/librte_security/meson.build @@ -4,3 +4,7 @@  sources = files('rte_security.c')  headers = files('rte_security.h', 'rte_security_driver.h')  deps += ['mempool', 'cryptodev'] + +if get_option('debug') + add_project_arguments('-DRTE_LIBRTE_SECURITY_DEBUG', language: 'c') +endif > # enable extra warnings and disable any unwanted warnings > warning_flags = [ > # -Wall is added by meson by default, so add -Wextra only > > -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com