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 798C743BAB; Thu, 29 Feb 2024 20:56:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 688A3432C6; Thu, 29 Feb 2024 20:54:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1376C42DCB for ; Thu, 29 Feb 2024 20:53:57 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EACBB20B74D2; Thu, 29 Feb 2024 11:53:55 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EACBB20B74D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709236435; bh=RBv9bqFYc9jUEhCevXh/eLnsK4HHbW2wSO9H/lhhS8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nt1KOiHPqnfpHtBES87H2SlVggpuesn8wFGyXxPkOMwsNIlu8MJDpddSCafiAiPFJ sByxzg4L7qRYYAZFPXTHM5NYUi5lEe9LrXpzsJFs/eJDnw1zCGUownYC3X1WFtL+yB 2z/58ndU4Gfct5VPzZ46GSi64SKRwJibXM2ui4VY= 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 v4 18/22] eventdev: stop using variadic argument pack extension Date: Thu, 29 Feb 2024 11:53:49 -0800 Message-Id: <1709236433-15428-19-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709236433-15428-1-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1709236433-15428-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/eventdev/eventdev_pmd.h | 10 ++++------ lib/eventdev/rte_event_timer_adapter.c | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index c415624..2ad8802 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -36,15 +36,13 @@ /* Logging Macros */ #define RTE_EDEV_LOG_ERR(...) \ - RTE_LOG_LINE(ERR, EVENTDEV, \ - RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__ ,), \ - __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,))) + RTE_LOG_LINE_PREFIX(ERR, EVENTDEV, \ + "%s() line %u: ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #ifdef RTE_LIBRTE_EVENTDEV_DEBUG #define RTE_EDEV_LOG_DEBUG(...) \ - RTE_LOG_LINE(DEBUG, EVENTDEV, \ - RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__ ,), \ - __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,))) + RTE_LOG_LINE_PREFIX(DEBUG, EVENTDEV, \ + "%s() line %u: ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #else #define RTE_EDEV_LOG_DEBUG(...) (void)0 #endif diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c index e6d3492..a3c6fb7 100644 --- a/lib/eventdev/rte_event_timer_adapter.c +++ b/lib/eventdev/rte_event_timer_adapter.c @@ -41,9 +41,8 @@ static const struct event_timer_adapter_ops swtim_ops; #define EVTIM_LOG(level, logtype, ...) \ - RTE_LOG_LINE(level, logtype, \ - RTE_FMT("EVTIMER: %s() line %u: " RTE_FMT_HEAD(__VA_ARGS__ ,), \ - __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,))) + RTE_LOG_LINE_PREFIX(level, logtype, \ + "EVTIMER: %s() line %u: ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #define EVTIM_LOG_ERR(...) EVTIM_LOG(ERR, EVTIM, __VA_ARGS__) -- 1.8.3.1