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 03DE6A0597; Fri, 17 Apr 2020 23:59:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E65FF1EBCC; Fri, 17 Apr 2020 23:58:17 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 1523F1EB87 for ; Fri, 17 Apr 2020 23:58:06 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200417215805euoutp025a78f7467ff8de3804da63f65c459001~GujwUPy6G0662106621euoutp02H for ; Fri, 17 Apr 2020 21:58:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200417215805euoutp025a78f7467ff8de3804da63f65c459001~GujwUPy6G0662106621euoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587160685; bh=97f9dJ9CgXI5W5FtLgInRl9tf0JP8KjhPDMLPlw+jlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zqs7PzMf6NualJW8KsTSPnJhPcPEqsZbBnVIX7ZMw4Su3beUiVbyc/BVAV/zfKQHx r2PEK97juTSFdReiWcYkS+VUYmbWMmKS2GbZ9tzO/ZB46VOwPhjHJqrs47lSChh8OY jGyPvyrPLumxrA+cRjXcXCo1jx7ESz/r6+PRPoC8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200417215805eucas1p2113ed497cb501f4cd5bf2740c20a6aad~GujwGXSKJ1749217492eucas1p2b; Fri, 17 Apr 2020 21:58:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C1.C4.60679.D662A9E5; Fri, 17 Apr 2020 22:58:05 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200417215805eucas1p114b3286afa16d6f12916048234f3a159~Gujvl3k-W0162301623eucas1p1s; Fri, 17 Apr 2020 21:58:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200417215805eusmtrp1ce02d4f64dc7d62aac52f38963d0ee9a~GujvlU6GF0397603976eusmtrp1s; Fri, 17 Apr 2020 21:58:05 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-7e-5e9a266d6bb9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 30.62.07950.D662A9E5; Fri, 17 Apr 2020 22:58:05 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200417215804eusmtip220eba79d20dea9ac4aef3b1258e40925~Guju50mX80325203252eusmtip2t; Fri, 17 Apr 2020 21:58:04 +0000 (GMT) From: Lukasz Wojciechowski To: Olivier Matz , Thomas Monjalon , John McNamara , Marko Kovacevic Cc: dev@dpdk.org Date: Fri, 17 Apr 2020 23:57:32 +0200 Message-Id: <20200417215739.23180-11-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+NgFnrHIsWRmVeSWpSXmKPExsWy7djPc7q5arPiDDY+ULV492k7k8X5eVtZ Lc5v7GW12Nq0kcni04MTLA6sHhf77zB6/FqwlNVj8Z6XTB7Hbk5jD2CJ4rJJSc3JLEst0rdL 4MrYueAeU8EisYrnT/+yNjBeFupi5OSQEDCR+PH1MVMXIxeHkMAKRonPx6azQThfGCUadz2B cj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SyQl1i94QBYnBMovvTld0aIZa4SDx+eYp/AyLeAkWEVo0hqaXFuem6xkV5x Ym5xaV66XnJ+7iZGYFhuO/Zzyw7GrnfBhxgFOBiVeHgNembGCbEmlhVX5h5ilOBgVhLhPegG FOJNSaysSi3Kjy8qzUktPsRoCnTURGYp0eR8YMzklcQbmhqaW1gamhubG5tZKInzdggcjBES SE8sSc1OTS1ILYLpY+LglGpg3KESs2mq6sXPJ5q5TRw893j3s+Rl387atMqwTPjgQ6a9oQZv uq8V73zlbGL++ttvu6mabw7sSf4530wtkfVU+9zbkkuFOhZdFv6xRGbLmfmrC7VkpooKyJ8V 3+KnL7BzdkjTOV9XPcezG0M+hDDeFZfS/xfkpLym0iOthNE3WslMo0fj++QKJZbijERDLeai 4kQA+shxW2ECAAA= X-CMS-MailID: 20200417215805eucas1p114b3286afa16d6f12916048234f3a159 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200417215805eucas1p114b3286afa16d6f12916048234f3a159 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200417215805eucas1p114b3286afa16d6f12916048234f3a159 References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-dev] [PATCH v1 10/17] mbuf: replace library debug flag with global one 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" Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_MBUF_DEBUG. The old define is completely removed from source code and config. Tests and documentation were also updated. Signed-off-by: Lukasz Wojciechowski --- app/test/test_mbuf.c | 2 +- config/common_base | 1 - doc/guides/prog_guide/mbuf_lib.rst | 2 +- lib/librte_mbuf/rte_mbuf.h | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 8200b4f71..0f0036c49 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -994,7 +994,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool) /* * Stress test for rte_mbuf atomic refcnt. * Implies that RTE_MBUF_REFCNT_ATOMIC is defined. - * For more efficiency, recommended to run with RTE_LIBRTE_MBUF_DEBUG defined. + * For more efficiency, recommended to run with RTE_DEBUG defined. */ #ifdef RTE_MBUF_REFCNT_ATOMIC diff --git a/config/common_base b/config/common_base index 310d5ab24..c24086789 100644 --- a/config/common_base +++ b/config/common_base @@ -852,7 +852,6 @@ CONFIG_RTE_LIBRTE_OCTEONTX2_MEMPOOL=y # Compile librte_mbuf # CONFIG_RTE_LIBRTE_MBUF=y -CONFIG_RTE_LIBRTE_MBUF_DEBUG=n CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" CONFIG_RTE_MBUF_REFCNT_ATOMIC=y CONFIG_RTE_PKTMBUF_HEADROOM=128 diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst index 0d3223b08..c04bb45d8 100644 --- a/doc/guides/prog_guide/mbuf_lib.rst +++ b/doc/guides/prog_guide/mbuf_lib.rst @@ -243,7 +243,7 @@ can be found in several of the sample applications, for example, the IPv4 Multic Debug ----- -In debug mode (CONFIG_RTE_MBUF_DEBUG is enabled), +In debug mode (RTE_DEBUG is enabled, e.g. by using "debug" option during meson setup), the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption, bad type, and so on). Use Cases diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f8e492e59..2deb309e0 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -341,17 +341,17 @@ rte_pktmbuf_priv_flags(struct rte_mempool *mp) #define RTE_MBUF_HAS_PINNED_EXTBUF(mb) \ (rte_pktmbuf_priv_flags(mb->pool) & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF) -#ifdef RTE_LIBRTE_MBUF_DEBUG +#ifdef RTE_DEBUG /** check mbuf type in debug mode */ #define __rte_mbuf_sanity_check(m, is_h) rte_mbuf_sanity_check(m, is_h) -#else /* RTE_LIBRTE_MBUF_DEBUG */ +#else /* RTE_DEBUG */ /** check mbuf type in debug mode */ #define __rte_mbuf_sanity_check(m, is_h) do { } while (0) -#endif /* RTE_LIBRTE_MBUF_DEBUG */ +#endif /* RTE_DEBUG */ #ifdef RTE_MBUF_REFCNT_ATOMIC -- 2.17.1