From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3085843BF6; Mon, 26 Feb 2024 21:21:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 285E542EDB; Mon, 26 Feb 2024 21:20:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DA55C42E07 for ; Mon, 26 Feb 2024 21:19:49 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 99F6E20B74CC; Mon, 26 Feb 2024 12:19:48 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 99F6E20B74CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708978788; bh=B5CL8C8Ks9c+/ZFhcPP4EOl2yt4yje7TRj1WZ07TYls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fx50JflJHuVwa4LdHsifgDN15UyGBP3G1icXOHB1bySm40U76YQLt17Tym2nCNrmH mfhhaER3MbO5rMy8y964amBTvDUgJZAEVuW861TohBMbODZYDB/WoybM+exT0AdqTl CbfHzV3Qqs7jhAMSI6770TOSyoOeVqEiBpylX4gU= From: Tyler Retzlaff To: dev@dpdk.org Cc: Anatoly Burakov , Ashish Gupta , Chenbo Xia , Cristian Dumitrescu , David Hunt , Fan Zhang , Hemant Agrawal , Honnappa Nagarahalli , Jasvinder Singh , Jerin Jacob , Konstantin Ananyev , Maxime Coquelin , Reshma Pattan , Sachin Saxena , Sivaprasad Tummala , Srikanth Yalavarthi , Stephen Hemminger , Sunil Kumar Kori , bruce.richardson@intel.com, mb@smartsharesystems.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3 12/16] rcu: stop using variadic argument pack extension Date: Mon, 26 Feb 2024 12:19:42 -0800 Message-Id: <1708978786-6740-13-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions which allow a prefix and arguments to be inserted into the log line without the need to use the ## args variadic argument pack extension. Signed-off-by: Tyler Retzlaff --- lib/rcu/rte_rcu_qsbr.c | 4 ++-- lib/rcu/rte_rcu_qsbr.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c index bd0b83b..f08d974 100644 --- a/lib/rcu/rte_rcu_qsbr.c +++ b/lib/rcu/rte_rcu_qsbr.c @@ -19,8 +19,8 @@ #include "rte_rcu_qsbr.h" #include "rcu_qsbr_pvt.h" -#define RCU_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args) +#define RCU_LOG(level, ...) \ + RTE_LOG_LINE_PREFIX(level, RCU, "%s(): ", __func__, __VA_ARGS__) /* Get the memory size of QSBR variable */ size_t diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index e7ef788..e4119cc 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -39,19 +39,19 @@ #define RTE_LOGTYPE_RCU rte_rcu_log_type #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG -#define __RTE_RCU_DP_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args) +#define __RTE_RCU_DP_LOG(level, ...) \ + RTE_LOG_DP_LINE_PREFIX(level, RCU, "%s(): ", __func__, __VA_ARGS__) #else -#define __RTE_RCU_DP_LOG(level, fmt, args...) +#define __RTE_RCU_DP_LOG(level, ...) #endif #if defined(RTE_LIBRTE_RCU_DEBUG) -#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, args...) do { \ +#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, ...) do { \ if (v->qsbr_cnt[thread_id].lock_cnt) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args); \ + RTE_LOG_LINE_PREFIX(level, RCU, "%s(): ", __func__, __VA_ARGS__); \ } while (0) #else -#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, args...) +#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, ...) #endif /* Registered thread IDs are stored as a bitmap of 64b element array. -- 1.8.3.1