From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: [PATCH v2 13/17] e1000/base: add a _RAW macro for use by shared code Date: Mon, 1 Sep 2014 12:24:36 +0200 Message-ID: <1409567080-27083-14-git-send-email-david.marchand@6wind.com> References: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1409567080-27083-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Since shared code always add a trailing \n, add a PMD_DRV_LOG_RAW macro that will not add one. Signed-off-by: David Marchand --- lib/librte_pmd_e1000/e1000/e1000_osdep.h | 4 ++-- lib/librte_pmd_e1000/e1000_logs.h | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_e1000/e1000/e1000_osdep.h b/lib/librte_pmd_e1000/e1000/e1000_osdep.h index b083a82..438641e 100644 --- a/lib/librte_pmd_e1000/e1000/e1000_osdep.h +++ b/lib/librte_pmd_e1000/e1000/e1000_osdep.h @@ -52,8 +52,8 @@ #define msec_delay(x) DELAY(1000*(x)) #define msec_delay_irq(x) DELAY(1000*(x)) -#define DEBUGFUNC(F) DEBUGOUT(F); -#define DEBUGOUT(S, args...) PMD_DRV_LOG(DEBUG, S, ##args) +#define DEBUGFUNC(F) DEBUGOUT(F "\n"); +#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args) #define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args) #define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args) #define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args) diff --git a/lib/librte_pmd_e1000/e1000_logs.h b/lib/librte_pmd_e1000/e1000_logs.h index b6b3bb7..fe6e023 100644 --- a/lib/librte_pmd_e1000/e1000_logs.h +++ b/lib/librte_pmd_e1000/e1000_logs.h @@ -63,10 +63,13 @@ #endif #ifdef RTE_LIBRTE_E1000_DEBUG_DRIVER -#define PMD_DRV_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) #else -#define PMD_DRV_LOG(level, fmt, args...) do { } while(0) +#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) #endif +#define PMD_DRV_LOG(level, fmt, args...) \ + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) + #endif /* _E1000_LOGS_H_ */ -- 1.7.10.4