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 97AF8A0597; Sat, 18 Apr 2020 00:00:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D19971EBE4; Fri, 17 Apr 2020 23:58:21 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 6781F1EB92 for ; Fri, 17 Apr 2020 23:58:08 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200417215808euoutp0149f1b6420ea05db9c409dcfa7f57f086~GujyetlsO2759027590euoutp01m for ; Fri, 17 Apr 2020 21:58:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200417215808euoutp0149f1b6420ea05db9c409dcfa7f57f086~GujyetlsO2759027590euoutp01m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587160688; bh=Bfl84AtPOW/TlVMh9AOzjSBS6cWoXLM1R1YVjTrBg94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NVKkLhi9fHWwpRlgjfn8YneBlq2h1usNd/PcSv/V2wCBW1V7/vMTrjInXsZrrrMBc sCMtiEDIpLMrHQpid1PtkivLrnyx0AjUneuvGGY4MSt8SXF+ZdL9W6NCioKoQUUbx8 C88u1QmwPGnr7XyA2jcj1KrZEdzwEphowRDLXr74= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200417215807eucas1p19f7eacf1d35714883f4a0c901da73635~Gujx7KqEm0163101631eucas1p15; Fri, 17 Apr 2020 21:58:07 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 22.C4.60679.F662A9E5; Fri, 17 Apr 2020 22:58:07 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200417215807eucas1p14de926321e5a683224f7550ae902af5b~GujxjC6Fd1204912049eucas1p1P; Fri, 17 Apr 2020 21:58:07 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200417215807eusmtrp1c1a2f953f457b42561b5566f4af205ac~GujxifsUl0397603976eusmtrp1u; Fri, 17 Apr 2020 21:58:07 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-81-5e9a266f6864 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D0.62.07950.F662A9E5; Fri, 17 Apr 2020 22:58:07 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200417215806eusmtip2ca4500acddf7aded06f5549bf437f8ae~Gujw-H5DL0325203252eusmtip2w; Fri, 17 Apr 2020 21:58:06 +0000 (GMT) From: Lukasz Wojciechowski To: Thomas Monjalon , Honnappa Nagarahalli , John McNamara , Marko Kovacevic Cc: dev@dpdk.org Date: Fri, 17 Apr 2020 23:57:35 +0200 Message-Id: <20200417215739.23180-14-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+NgFnrHIsWRmVeSWpSXmKPExsWy7djPc7r5arPiDKb/kbN492k7k8XMpy3s FufnbWW1OL+xl9Xi04MTLA6sHmvmrWH0+LVgKavH4j0vmTyO3ZzGHsASxWWTkpqTWZZapG+X wJXRc20zS8FjpYoXd6awNDA+leli5OSQEDCR2HBxBlMXIxeHkMAKRol/N7tZIZwvjBJv932B ynxmlHi2eQ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B9fIK uElsW/6fEWKBvMTqDQfA4pxA8aUvv4PFhQRcJR4+PMU+gZFvASPDKkaR1NLi3PTcYiO94sTc 4tK8dL3k/NxNjMCw3Hbs55YdjF3vgg8xCnAwKvHwGvTMjBNiTSwrrsw9xCjBwawkwnvQDSjE m5JYWZValB9fVJqTWnyI0RToqInMUqLJ+cCYySuJNzQ1NLewNDQ3Njc2s1AS5+0QOBgjJJCe WJKanZpakFoE08fEwSnVwKgkyzxjR35J63W2AvZyUW+F/T0ltTPn5xtr3Q1jm33sX/f85h03 Zk3b2zF/Q0Fk2bKecrnW7ezxRTdXPNFflz3hJ/PyI7+V2NvztLISlI9W3q+YdyrTjz1j+u2p UpoHDgUeOrF8yud1FiEfVj2e9tOnchLvn4JCsZkcnYdmhNrw53FWi+04d0KJpTgj0VCLuag4 EQC1GSfEYQIAAA== X-CMS-MailID: 20200417215807eucas1p14de926321e5a683224f7550ae902af5b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200417215807eucas1p14de926321e5a683224f7550ae902af5b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200417215807eucas1p14de926321e5a683224f7550ae902af5b References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-dev] [PATCH v1 13/17] rcu: 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_RCU_DEBUG. The old define is completely removed from source code and config. Documentation was also updated. Signed-off-by: Lukasz Wojciechowski --- config/common_base | 1 - doc/guides/prog_guide/rcu_lib.rst | 8 ++++---- lib/librte_rcu/rte_rcu_qsbr.h | 16 ++++++++-------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/config/common_base b/config/common_base index 5863b4327..c22e9a6fe 100644 --- a/config/common_base +++ b/config/common_base @@ -915,7 +915,6 @@ CONFIG_RTE_LIBRTE_TELEMETRY=n # Compile librte_rcu # CONFIG_RTE_LIBRTE_RCU=y -CONFIG_RTE_LIBRTE_RCU_DEBUG=n # # Compile librte_rib diff --git a/doc/guides/prog_guide/rcu_lib.rst b/doc/guides/prog_guide/rcu_lib.rst index 9b0bf138f..ecdea9c9c 100644 --- a/doc/guides/prog_guide/rcu_lib.rst +++ b/doc/guides/prog_guide/rcu_lib.rst @@ -186,7 +186,7 @@ they entered a quiescent state. This API checks if a writer has triggered a quiescent state query and update the state accordingly. The ``rte_rcu_qsbr_lock()`` and ``rte_rcu_qsbr_unlock()`` are empty functions. -However, when ``CONFIG_RTE_LIBRTE_RCU_DEBUG`` is enabled, these APIs aid -in debugging issues. One can mark the access to shared data structures on the -reader side using these APIs. The ``rte_rcu_qsbr_quiescent()`` will check if -all the locks are unlocked. +However, when ``RTE_DEBUG`` is enabled, these APIs aid in debugging issues. +One can mark the access to shared data structures on the reader side using +these APIs. The ``rte_rcu_qsbr_quiescent()`` will check if all the locks +are unlocked. diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h index 0b5585925..bc8ab102c 100644 --- a/lib/librte_rcu/rte_rcu_qsbr.h +++ b/lib/librte_rcu/rte_rcu_qsbr.h @@ -45,7 +45,7 @@ extern int rte_rcu_log_type; #define __RTE_RCU_DP_LOG(level, fmt, args...) #endif -#if defined(RTE_LIBRTE_RCU_DEBUG) +#ifdef RTE_DEBUG #define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, args...) do {\ if (v->qsbr_cnt[thread_id].lock_cnt) \ rte_log(RTE_LOG_ ## level, rte_rcu_log_type, \ @@ -78,7 +78,7 @@ struct rte_rcu_qsbr_cnt { * changes to various APIs. */ uint32_t lock_cnt; - /**< Lock counter. Used when CONFIG_RTE_LIBRTE_RCU_DEBUG is enabled */ + /**< Lock counter. Used when RTE_DEBUG is enabled */ } __rte_cache_aligned; #define __RTE_QSBR_CNT_THR_OFFLINE 0 @@ -323,11 +323,11 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id) * This API is provided to aid debugging. This should be called before * accessing a shared data structure. * - * When CONFIG_RTE_LIBRTE_RCU_DEBUG is enabled a lock counter is incremented. + * When RTE_DEBUG is enabled a lock counter is incremented. * Similarly rte_rcu_qsbr_unlock will decrement the counter. When the * rte_rcu_qsbr_check API will verify that this counter is 0. * - * When CONFIG_RTE_LIBRTE_RCU_DEBUG is disabled, this API will do nothing. + * When RTE_DEBUG is disabled, this API will do nothing. * * @param v * QS variable @@ -341,7 +341,7 @@ rte_rcu_qsbr_lock(__rte_unused struct rte_rcu_qsbr *v, { RTE_ASSERT(v != NULL && thread_id < v->max_threads); -#if defined(RTE_LIBRTE_RCU_DEBUG) +#ifdef RTE_DEBUG /* Increment the lock counter */ __atomic_fetch_add(&v->qsbr_cnt[thread_id].lock_cnt, 1, __ATOMIC_ACQUIRE); @@ -360,11 +360,11 @@ rte_rcu_qsbr_lock(__rte_unused struct rte_rcu_qsbr *v, * This API is provided to aid debugging. This should be called after * accessing a shared data structure. * - * When CONFIG_RTE_LIBRTE_RCU_DEBUG is enabled, rte_rcu_qsbr_unlock will + * When RTE_DEBUG is enabled, rte_rcu_qsbr_unlock will * decrement a lock counter. rte_rcu_qsbr_check API will verify that this * counter is 0. * - * When CONFIG_RTE_LIBRTE_RCU_DEBUG is disabled, this API will do nothing. + * When RTE_DEBUG is disabled, this API will do nothing. * * @param v * QS variable @@ -378,7 +378,7 @@ rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v, { RTE_ASSERT(v != NULL && thread_id < v->max_threads); -#if defined(RTE_LIBRTE_RCU_DEBUG) +#ifdef RTE_DEBUG /* Decrement the lock counter */ __atomic_fetch_sub(&v->qsbr_cnt[thread_id].lock_cnt, 1, __ATOMIC_RELEASE); -- 2.17.1