From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id CFF84B390 for ; Mon, 1 Sep 2014 12:20:44 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id q59so5209041wes.35 for ; Mon, 01 Sep 2014 03:25:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=duNt74YZ0e0LjV92C4Z0SKvmxQHVwtqo4LXAC5d+2CM=; b=jSK3jCS/UFFECsdsSwUe4CcKS/yvd4LvS699eSUOYg4POUeOB9bynwlNLvuwv29cuq qslKsG8nIaUyrCjEvsa2KEZWdenF7SjZbPuI6ozUZEcVG6Pkc04pfNF6hcxHEJxormId NfMnKUHTq77ZetPkH2NOvEALJaeBV9Gsl8j49lK8WYNcxh+PsN5JKjAVcZuQSTaCT8Ca Yb6XTf6eDY6w6FG2qRn5NFET6reHx3F9gwfhDamJmfrjKjXOk5PZHYYcB0NBgZAvofuP o1Aia1fUHN9q+74JtfLBEEYw382zaqZ2sJHabvQMSJDWLN4u01ys5azS7uRYsjbsAQQH Oq1g== X-Gm-Message-State: ALoCoQlr3LfvVQ9EhD4Qp0pLE5P8xy+loLxTdvUzQBAVp9EjPYWu2PLRwqwEZw4Khb5VA1fMEkaI X-Received: by 10.180.212.105 with SMTP id nj9mr14799517wic.51.1409567111754; Mon, 01 Sep 2014 03:25:11 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id lm18sm24287018wic.22.2014.09.01.03.25.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:25:11 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:24:36 +0200 Message-Id: <1409567080-27083-14-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> References: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 13/17] e1000/base: add a _RAW macro for use by shared code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 10:20:44 -0000 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