From patchwork Wed Sep 17 13:46:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 412 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id CA0F6B3B0; Wed, 17 Sep 2014 15:41:51 +0200 (CEST) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 1D739B3B1 for ; Wed, 17 Sep 2014 15:41:46 +0200 (CEST) Received: by mail-wg0-f49.google.com with SMTP id m15so1431899wgh.20 for ; Wed, 17 Sep 2014 06:47:27 -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:cc:subject:date:message-id:in-reply-to :references; bh=F39sPPMqjX2Ss/HKfOZBd9Uqf5vfvZD3Uc2t817Pr1Y=; b=PeyqpPuz5iIOrXLLXYJ37qaMBGFgy2uNgrs83aPD52cyHDhN929lQ1KAQREE4bYCPR 4suAV4vmdGRmRQZAaytA3dEZXBpd99e/ATTSj6wIygkjvJ/QNyDqbxJKcarP+4TaqF1C i9IYmiY0htvOrkNmYfYSd4N2pYkWQQcoUrTw4P7fUfWBNkaUyltojunzO/UGsB/ur+lA D7nBLaD+2EFvh/1yLNfYolKzduHrDGde5eQ0/AJGrzDvAxmGj5RtH3/Twi1kkbsAHRQQ DW5TbwBKvX4tCQeEgh/hVmc9809opcaLcXcS4qwr+JHy/wiP8ulucmy0fjH88yu+tucm wd0Q== X-Gm-Message-State: ALoCoQmFcah/b8GdOYmKApYiFE3GJmElcWyMtBgFXgMbPoHn0JutFtpEUxXwrZdy0vPUYwSVcdfy X-Received: by 10.180.211.172 with SMTP id nd12mr5752092wic.74.1410961647307; Wed, 17 Sep 2014 06:47:27 -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 fa20sm5712872wic.1.2014.09.17.06.47.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 06:47:26 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Wed, 17 Sep 2014 15:46:47 +0200 Message-Id: <1410961612-8571-16-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1410961612-8571-1-git-send-email-david.marchand@6wind.com> References: <1410961612-8571-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v3 15/20] 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: , Errors-To: dev-bounces@dpdk.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 Acked-by: Bruce Richardson --- 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_ */