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 ACB9D43B7D; Thu, 29 Feb 2024 22:34:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 180A143324; Thu, 29 Feb 2024 22:32:54 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6F9A342FC5 for ; Thu, 29 Feb 2024 22:32:09 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E064220B74D2; Thu, 29 Feb 2024 13:32:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E064220B74D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709242327; bh=RBv9bqFYc9jUEhCevXh/eLnsK4HHbW2wSO9H/lhhS8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZkM87Q5BuVq9MOg+gzniA3XHeT0ESb/jyStJR2tTM5ILta7AfBGNOCGo1U/lOM50R YrzLQvooKK/70eLcfISNQy07eAl+O2Ytia7+e6J6nZwYmp872Wf1MhvIlFWjEzd45x 98a7KGNtV4LBEN3UKFdxRgeS5evVCEJy/v23dIIA= 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 v5 18/22] eventdev: stop using variadic argument pack extension Date: Thu, 29 Feb 2024 13:32:01 -0800 Message-Id: <1709242325-17218-19-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709242325-17218-1-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1709242325-17218-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