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 B31F8A00C2; Fri, 24 Apr 2020 12:14:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD8301C0DC; Fri, 24 Apr 2020 12:14:27 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 60B171C0D9 for ; Fri, 24 Apr 2020 12:14:26 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200424101425euoutp01900389b46960227d915084739dab443b~IueXSmJyG1015010150euoutp01a for ; Fri, 24 Apr 2020 10:14:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200424101425euoutp01900389b46960227d915084739dab443b~IueXSmJyG1015010150euoutp01a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587723265; bh=R+iibi6xfdlySyxcEx9o3br5eEWPFiKWMPSenuxom5Q=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=tH5tWO8Fy21e5sSDfF4G7R35tzYhHch4Wv+bnP8Nn3dkDKplRa9mON0h5SZLK4z/d vvBzHsF+7rIMrNUKS9eIHtzU188Dt5jov+nQ6UtP7DnrHKCyniQDYYLjuwv4m0jsfo YzC+Sic4q+m6QNNp1qcBA7sMC2YmvKDa1IYTXLSQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200424101425eucas1p1ca9231e35f50a1e0b97a90abffc58de0~IueXNd5Nt1951719517eucas1p1p; Fri, 24 Apr 2020 10:14:25 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 18.F6.61286.10CB2AE5; Fri, 24 Apr 2020 11:14:25 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200424101424eucas1p192068758c07bb5afeb7849b565a0b691~IueW6UUsw1951419514eucas1p1o; Fri, 24 Apr 2020 10:14:24 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200424101424eusmtrp21668bc4fd83fa61abc3c522773d71469~IueW5zm410799707997eusmtrp2j; Fri, 24 Apr 2020 10:14:24 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-02-5ea2bc01b25b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 33.EF.07950.00CB2AE5; Fri, 24 Apr 2020 11:14:24 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200424101424eusmtip1d52e80bb50ef545849e8b16feb48225b~IueWljAjL1268112681eusmtip1f; Fri, 24 Apr 2020 10:14:24 +0000 (GMT) To: Bruce Richardson Cc: dev@dpdk.org From: Lukasz Wojciechowski Message-ID: <13521036-fbc8-4308-ced2-18552e4569ea@partner.samsung.com> Date: Fri, 24 Apr 2020 12:14:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200424090923.GA1440@bricha3-MOBL.ger.corp.intel.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42LZduznOV3GPYviDGbt47W4scre4t2n7UwO TB6/Fixl9Vi85yVTAFMUl01Kak5mWWqRvl0CV8bzHX+YC56LVSyY3sPWwNgo1MXIySEhYCKx /8MqNhBbSGAFo8SK08oQ9hdGib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xOwj/YwgNouAqkTL9h5WkMWiArESLRc1IUoE JU7OfALWyingInF17XdWiPlmEvM2P4TaJS/RvHU2lC0iceNRC+MERqFZSNpnIWmZhaRlFpKW BYwsqxhFUkuLc9Nzi430ihNzi0vz0vWS83M3MQJjZNuxn1t2MHa9Cz7EKMDBqMTDa1C6ME6I NbGsuDL3EKMEB7OSCG9MyaI4Id6UxMqq1KL8+KLSnNTiQ4ymQL9NZJYSTc4Hxm9eSbyhqaG5 haWhubG5sZmFkjhvh8DBGCGB9MSS1OzU1ILUIpg+Jg5OqQbGFdPlDv7JiYra4TXHK+uAfVOv RofoqpI7ezP4s/4fNve9OOvMmoU7jc+Gvl7z9IeT91VHXa0U1UvbZ9i8fvuJx1l65ur3Cf5b 5N/oKWTYT1q144bClaRp89ew2m6Q+Xbr6qZOTb52PsmJUcmJLyceTrIt+Ny1tiBge/KbXQpt UZo2rzk2Od1SU2Ipzkg01GIuKk4EAGZZ9binAgAA X-CMS-MailID: 20200424101424eucas1p192068758c07bb5afeb7849b565a0b691 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200422214613eucas1p153ed981de395ef1b800364a003da85e5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200422214613eucas1p153ed981de395ef1b800364a003da85e5 References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> <20200422214555.11837-1-l.wojciechow@partner.samsung.com> <20200424090923.GA1440@bricha3-MOBL.ger.corp.intel.com> Subject: Re: [dpdk-dev] [PATCH v2 0/3] introduce global 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" W dniu 24.04.2020 o 11:09, Bruce Richardson pisze: > On Wed, Apr 22, 2020 at 11:45:52PM +0200, Lukasz Wojciechowski wrote: >> This set of patches introduces a global rte_debug flag for dpdk. >> This will allow easy switch to debug build configuration using a single >> flag. In the debug mode a RTE_DEBUG macro is defined to 1 >> and for every enabled to be built librarte a RTE_DEBUG_{library name} >> is also defined. These macros can be used to place a debug code >> inside #ifdef #endif clauses. >> >> The following requirements were discussed on the mailing list: >> 1) The global debug flag is required to enable all the sanity checks >> and validations that are normally not used due to performance reasons >> >> 2) The best option would be to have a single flag - not to introduce >> too many build options >> >> 3) This option should be separated from meson "debug" option >> (used for build with symbols) and can be called "rte_debug" >> >> 4) The currently existing DEBUG macros should not be replaced with >> a RTE_DEBUG macro. This would allow to still enable them using >> CFLAGS="-D..." to test a single module (library, driver). >> >> 5) Currently existing options' names should be standardized >> to RTE_DEBUG_{library/driver name}, so they can be automatically enabled >> when rte_debug is set. Standardized names would allow easy usage >> in other modules. >> >> 6) The debug functionality should be encapsulated in: >> if (rte_log_can_log(...)) { >> ... >> } >> for possibility to be filtered out in runtime. >> >> >> Because of the hot discussion of v1 version of patches, I limit >> the v2 version to mbuf library changes only, to see how it will impact >> the performance with rte_log_can_log usage and to get opinions. >> >> Next steps would be to follow changes in other libraries and drivers. >> >> --- >> v2: >> * Use new meson option rte_debug instead of debug >> * Add standardized defines for built libraries >> * Limit patches to mbuf library (as a POC) >> * Use rte_log_can_log to wrap debug section >> >> Lukasz Wojciechowski (3): >> config: introduce global rte debug flag >> config: remove unused config flags >> mbuf: standardize library debug flag >> > I really like this set, looks a good approach to me anyway. > > Out of interest - did you automate the scanning for all the different build > flags to find those in the second patch that weren't used, or did you come > across them by chance? Just wondering if there are any other unused flags > we can remove. I've done this semi-automated way. Just some greping and seding, but I focused  only on debug flags, so there might be more other flags. -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com