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 99378A00C2; Wed, 22 Apr 2020 23:46:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E95A1C437; Wed, 22 Apr 2020 23:46:17 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 855A61C2EC for ; Wed, 22 Apr 2020 23:46:15 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200422214614euoutp0251dadad9e01479e77a8861040d20fe74~IQn1dgUWP0406504065euoutp02b for ; Wed, 22 Apr 2020 21:46:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200422214614euoutp0251dadad9e01479e77a8861040d20fe74~IQn1dgUWP0406504065euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587591974; bh=bmvvwR1E7Mgrr7/ZoKJUhUE1K1k5M4A08PNa6RwaVYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYA+QjiLB+Se0oJv6yAOxDiaCPNqjtU37la7ZDamOmPPJb4kkbIvPDQYLIXS39H+7 OXEUbfsARDkraD8v4TuZguk5DALZNQigZmZdbgyj2VkEhALLPmQdKKIXGq+s3+Ko3g wKyeSkb5tfCBAlLRuBSj1ihhGgpKvnfNfWa0KFXw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200422214614eucas1p2ef5bc5d2c4e874753af137819535d07e~IQn03vIUC1844518445eucas1p2N for ; Wed, 22 Apr 2020 21:46:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 32.22.60698.62BB0AE5; Wed, 22 Apr 2020 22:46:14 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200422214613eucas1p153ed981de395ef1b800364a003da85e5~IQn0YlTvn0104701047eucas1p1L for ; Wed, 22 Apr 2020 21:46:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200422214613eusmtrp2473d40c878285a2c1c90c0aa1df48b6d~IQn0YGNX52378123781eusmtrp2E for ; Wed, 22 Apr 2020 21:46:13 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-d9-5ea0bb26e00b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BF.A7.07950.52BB0AE5; Wed, 22 Apr 2020 22:46:13 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200422214613eusmtip1ff952a4f13e4b30c52c0ea79e083fa45~IQn0GFE2w0468504685eusmtip1Y for ; Wed, 22 Apr 2020 21:46:13 +0000 (GMT) From: Lukasz Wojciechowski To: Cc: dev@dpdk.org Date: Wed, 22 Apr 2020 23:45:52 +0200 Message-Id: <20200422214555.11837-1-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFIsWRmVeSWpSXmKPExsWy7djPc7pquxfEGTRs57F492k7kwOjx68F S1kDGKO4bFJSczLLUov07RK4MmZ0TGIp+CBUcfLfIfYGxs18XYycHBICJhK7v01l6WLk4hAS WMEo8Wb1FmYIp51J4tymi1BOG5PE7pfPWLsYOcBauu/nQMSXM0p0PvzABle05O5lZpC5bAK2 EkdmfmUFsUUEWCRWfv/OAmIzCwhIP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K74eG8OCHelMTKqtSi/Pii0pzU4kOMpkBHTWSWEk3OB4Z6Xkm8oamhuYWl obmxubGZhZI4b4fAwRghgfTEktTs1NSC1CKYPiYOTqkGRjf/vR/8/jXZGwuXzJfLrVVKk76q +llireW+Aq2sgJwmt5CwE+uvrrgctOnWOVsR7ZhT/zJuRfwtnL4i4SPn6w0/lLlvVPPZB9QH Twz7fV9eauLVGadvBG1QWGcUdXO66OuKO/nlmzubA50m6O2aeHPB13Obt9VPX1yk8C1wms2C +zmcTg2ON5VYijMSDbWYi4oTAc7VZq89AgAA X-CMS-MailID: 20200422214613eucas1p153ed981de395ef1b800364a003da85e5 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> Subject: [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" 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 app/test/test_mbuf.c | 3 ++- config/common_base | 5 ----- config/meson.build | 4 ++++ doc/guides/prog_guide/mbuf_lib.rst | 2 +- lib/librte_mbuf/rte_mbuf.h | 12 ++++++++---- lib/meson.build | 4 ++++ meson_options.txt | 2 ++ 7 files changed, 21 insertions(+), 11 deletions(-) -- 2.17.1