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 08BC9A0540; Tue, 14 Jul 2020 00:39:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 693F81D64C; Tue, 14 Jul 2020 00:39:48 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 9F2391D64A for ; Tue, 14 Jul 2020 00:39:47 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200713223946euoutp01c3cac32419686ceee5a1aedb5bd3d8fa~hcP_9R45f0405804058euoutp01J for ; Mon, 13 Jul 2020 22:39:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200713223946euoutp01c3cac32419686ceee5a1aedb5bd3d8fa~hcP_9R45f0405804058euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594679986; bh=c+cOJxme+VzTSq3P1taL+D5LBceYLssIMcw2EcW9hAw=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=Wszi54bafOdSGhvkGcWMTWc8lYYJh18DETd0UIGmXl6IGdK44FlTwZ5ooHKHn+T01 lOUznZW1GC9PF94Vwbpb9FD8twdbiYhpV/Q1iyqe4MWcVcwnv7+GNAeqeA76E0GTNt 3A4moHLG2sCHDAJgsqxihwnIzW3a+jUbJQvZwbds= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200713223946eucas1p170c36805d18f4f5a00bb1593b937b16c~hcP_rEX-M0797907979eucas1p13; Mon, 13 Jul 2020 22:39:46 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1D.AD.06318.2B2EC0F5; Mon, 13 Jul 2020 23:39:46 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200713223945eucas1p2d65db8e13362c015837f4bd6e8fa7ab6~hcP96tRls1733917339eucas1p2h; Mon, 13 Jul 2020 22:39:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200713223945eusmtrp25c64880a286fef90081174bade66fddf~hcP96LQjr1166911669eusmtrp2V; Mon, 13 Jul 2020 22:39:45 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-e8-5f0ce2b2132a Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id CB.AC.06017.1B2EC0F5; Mon, 13 Jul 2020 23:39:45 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200713223945eusmtip129495f8e140a599ad2555066dd92d5b4~hcP9YvFHj2583825838eusmtip1C; Mon, 13 Jul 2020 22:39:44 +0000 (GMT) To: Thomas Monjalon Cc: dev@dpdk.org, bruce.richardson@intel.com, david.marchand@redhat.com From: Lukasz Wojciechowski Message-ID: Date: Tue, 14 Jul 2020 00:39:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <2283396.fTMGzKxhym@thomas> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKKsWRmVeSWpSXmKPExsWy7djPc7qbHvHEG5z8LWZxY5W9xfYVXWwW 7z5tZ7L49OAEiwOLx68FS1k9Fu95yeRx7OY0do/3+66yBbBEcdmkpOZklqUW6dslcGVcvTWT seC3eMWpN3ENjB3CXYwcHBICJhKdU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v7LEaQXmYBd4kf5xxAwkICnxglXj42ALHZBGwljsz8ygpi8wq4SSzouMcE YrMIqEr8P36LEcQWFYiTWL5lPjtEjaDEyZlPWEBsTgENiWXXz4HVMwuYSczb/JAZwpaXaN46 G8oWl7j1ZD7TBEahWUjaZyFpmYWkZRaSlgWMLKsYRVJLi3PTc4uN9IoTc4tL89L1kvNzNzEC 42jbsZ9bdjB2vQs+xCjAwajEwyvhzxMvxJpYVlyZe4hRgoNZSYTX6ezpOCHelMTKqtSi/Pii 0pzU4kOMpkDPTWSWEk3OB8Z4Xkm8oamhuYWlobmxubGZhZI4b4fAwRghgfTEktTs1NSC1CKY PiYOTqkGxuba18XiUp7H7bSbm9LjGY/bR/3TTNPZGOOmP+nSPG6BGSfvGGlp/BE45vxx5u93 1Wx6dpUBgRk7z++z2m631ViSwUilLcXiVupMr+PKc+p+zpzZF772doHU7NKylNSWBZ73E9Mb Bfi8BHZGuctUZp+ff+DRhbdc+523Bn7lO891eUW4M/8yJZbijERDLeai4kQA+1IkwrkCAAA= X-CMS-MailID: 20200713223945eucas1p2d65db8e13362c015837f4bd6e8fa7ab6 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200709134846eucas1p193d963c3f21f0d5c4985024b6d015042 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200709134846eucas1p193d963c3f21f0d5c4985024b6d015042 References: <20200422214555.11837-1-l.wojciechow@partner.samsung.com> <20200709134823.9176-1-l.wojciechow@partner.samsung.com> <2283396.fTMGzKxhym@thomas> Subject: Re: [dpdk-dev] [PATCH v3 0/4] 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 11.07.2020 o 17:11, Thomas Monjalon pisze: > 09/07/2020 15:48, Lukasz Wojciechowski: >> 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 library a RTE_DEBUG_{library name} >> and for every enabled to be built driver >> a RTE_DEBUG_{driver_class}_{driver_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). > Please can we clarify this point? > You mean not replacing driver macros with the global RTE_DEBUG? > But we agree (next point) to replace existing macros? Yes, I'll try. This point was added after discussion about using a single RTE_DEBUG flag for all debugs. I think we all agreed that it will be better to keep separate flags for separate libraries or drivers instead of using only one RTE_DEBUG flag for all debugs. e.g. in current version of patches there is a flag RTE_DEBUG_MBUF for debugs related to librte_mbuf. This allows to enable only some debugs at compile time passing them to CFLAGS. >> 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. >> >> v3 contains mbuf performance tests, which might help dpdk developers >> community to decide if drop of performance related to rte_log_can_log >> can be accepted. >> >> If agreement is reached, next steps would be to follow changes >> in other libraries and drivers. > If I understand well, it makes no sense to apply this v3, > without having the rest of the code converted? > > > > -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com