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 5F6CEA04A6; Wed, 9 Feb 2022 11:36:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A9DC41C28; Wed, 9 Feb 2022 11:35:58 +0100 (CET) Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by mails.dpdk.org (Postfix) with ESMTP id 454504122E for ; Wed, 9 Feb 2022 11:35:57 +0100 (CET) X-QQ-mid: bizesmtp37t1644402949t7z6oslb Received: from wxdbg.localdomain.com (unknown [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 09 Feb 2022 18:35:48 +0800 (CST) X-QQ-SSF: 01400000002000F0L000B00A0000000 X-QQ-FEAT: TskX/GkkryB209XEV7x65DmQvHLX8AR9LE/p900HQwSIxYeuwB7FYOr7wpwKc aR5ol3wZY63Xgmia+CJp8RUc+P4ck8DiXMI61jvypTzcNk0WguWktKN5oPJDE7y60hUJPmP T7lenaEJdiFrWQiKai8zhbhysAEa2yBWoxmcvn1KYmkuKh8DgQ6yVzWi0KbzExb/aIxhUa2 dsHe296zuY0tRUC6yp8ZNr8pCUWsO+RcyS0S++MZ1fCXtwv8kImplq2eo9G7JJv8hYxRj1Z Th6FMDwVCr3K9jS+4iGue61r2/qU4T8176yL5HV3X/kgYdxp91HBPo119OmToCnlmHKlVKn NVh1wv5Yl+mbL8P7oFPkG32ljl5R6wOqxSEeSJU0Nk45HzaPUI= X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH v2 08/12] net/ngbe: fix debug log Date: Wed, 9 Feb 2022 18:42:09 +0800 Message-Id: <20220209104213.602728-9-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220209104213.602728-1-jiawenwu@trustnetic.com> References: <20220209104213.602728-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 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 Remove 'DEBUGFUNC' due to too many invalid debug log prints. And fix that double line was added by using 'DEBUGOUT'. Fixes: cc934df178ab ("net/ngbe: add log and error types") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/ngbe/ngbe_logs.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ngbe/ngbe_logs.h b/drivers/net/ngbe/ngbe_logs.h index fd306419e6..b7d78fb400 100644 --- a/drivers/net/ngbe/ngbe_logs.h +++ b/drivers/net/ngbe/ngbe_logs.h @@ -15,9 +15,12 @@ extern int ngbe_logtype_init; "%s(): " fmt "\n", __func__, ##args) extern int ngbe_logtype_driver; -#define PMD_DRV_LOG(level, fmt, args...) \ +#define PMD_TLOG_DRIVER(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, ngbe_logtype_driver, \ - "%s(): " fmt "\n", __func__, ##args) + "%s(): " fmt, __func__, ##args) + +#define PMD_DRV_LOG(level, fmt, args...) \ + PMD_TLOG_DRIVER(level, fmt "\n", ## args) #ifdef RTE_ETHDEV_DEBUG_RX extern int ngbe_logtype_rx; @@ -37,10 +40,10 @@ extern int ngbe_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif -#define TLOG_DEBUG(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args) +#define TLOG_DEBUG(fmt, args...) PMD_TLOG_DRIVER(DEBUG, fmt, ##args) #define DEBUGOUT(fmt, args...) TLOG_DEBUG(fmt, ##args) #define PMD_INIT_FUNC_TRACE() TLOG_DEBUG(" >>") -#define DEBUGFUNC(fmt) TLOG_DEBUG(fmt) +#define DEBUGFUNC(fmt) do { } while (0) #endif /* _NGBE_LOGS_H_ */ -- 2.21.0.windows.1