From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id B2AEAB398 for ; Mon, 1 Sep 2014 12:20:22 +0200 (CEST) Received: by mail-wi0-f169.google.com with SMTP id n3so2359748wiv.0 for ; Mon, 01 Sep 2014 03:24:49 -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=/yRfWC5mknya9CCyrYwS3wHbf0U2FgIQ/PsiWHbj0Ko=; b=AqUEsi42gZzZjBJczggcZnSRjs7KRRSNfkQrQu1UJkoCxQKrwIIxNFxVHjcF1H9fjH DTJzwFKUe5Z9bSiW6t1Ak2JLCebI4Kk2ADsyGg5oNeTiIrKqJ5p0kAsUl7Y/8imZ4sL/ GsnP/lPDrGmOdxHgPwj5jXGc0Kb7llgOZW/Fmd+vk0UqKn0n7hbiYXQf4+ElW+BZ22z/ EmMXUwm/aYfr+R99qLpAzq8Lv8BA+AseFRPklkZTsC+6hKZw8k1jey0QUXVr/buXYcYC dWBj6tJYD9iR6QLbdPpBci8tvzLDtAUN4IrXM+KjP47N4G6G2yiZQaL1ASW/Nt7MTQ73 apOA== X-Gm-Message-State: ALoCoQl3R8IVvv12FsVzmm0zFFoy5KKW5wzfiLM1bzf1pB7hFOVhrwHFrgQt///Dv7lti49BkCRX X-Received: by 10.194.77.243 with SMTP id v19mr30667411wjw.18.1409567089637; Mon, 01 Sep 2014 03:24:49 -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.24.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:24:49 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:24:25 +0200 Message-Id: <1409567080-27083-3-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 02/17] ixgbe/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:22 -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_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++-- lib/librte_pmd_ixgbe/ixgbe_logs.h | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h index 2bf1a6d..ae9c280 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h @@ -54,8 +54,8 @@ #define usec_delay(x) DELAY(x) #define msec_delay(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_ixgbe/ixgbe_logs.h b/lib/librte_pmd_ixgbe/ixgbe_logs.h index 9f0a684..4685c18 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_logs.h +++ b/lib/librte_pmd_ixgbe/ixgbe_logs.h @@ -65,10 +65,13 @@ #endif #ifdef RTE_LIBRTE_IXGBE_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 /* _IXGBE_LOGS_H_ */ -- 1.7.10.4