From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 65EB4B3C6 for ; Wed, 17 Sep 2014 15:41:37 +0200 (CEST) Received: by mail-wi0-f174.google.com with SMTP id n3so1251503wiv.13 for ; Wed, 17 Sep 2014 06:47:17 -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=CtrJFGsR7enIH1aEPDYyOO0hJgEhDUr2TERx5KP1OsI=; b=TEn17LNU9WwMiLNSSOlnsvjup/3umlUxo+l8gh0ITLtyQNaomEZ9yExpdVGrV0hRiV aYmW5VtDnOn0hYZNgqK5Fv4Crrsxg7dvDLIlnjwnZRoewKXxR36PGgQ7PI8QT8IJ5j+l oIpXGr2TECOAnEw0b/X5QrXfzuA9bO3fo5NGTiiWqYltzu6BW3k8dweeYx+o4j1CTnIQ kf5XVPkCqii+rn4sRacTpyk5sohsu1IEBOdyn8JIehx+rWEItQjwOPH76ZTx24xE3pVN NgLJA+lMLsCumwYzb6QdOx+qthgNLgKEfbIiSt2YqjATCxnW/kVyM3af9Lp9gjlyrLL4 XqFA== X-Gm-Message-State: ALoCoQnU/tg4uOYnZblllIGejpwIGz6pLr6Ve+ZZrUQh0Yt4lANheHu8B754GZ4dexPxf0qiWgR5 X-Received: by 10.194.179.197 with SMTP id di5mr3242429wjc.125.1410961637870; Wed, 17 Sep 2014 06:47:17 -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.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 06:47:17 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Wed, 17 Sep 2014 15:46:41 +0200 Message-Id: <1410961612-8571-10-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 09/20] i40e/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: Wed, 17 Sep 2014 13:41:39 -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 Acked-by: Bruce Richardson --- lib/librte_pmd_i40e/i40e/i40e_osdep.h | 8 ++++---- lib/librte_pmd_i40e/i40e_logs.h | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e/i40e_osdep.h b/lib/librte_pmd_i40e/i40e/i40e_osdep.h index 0ed4b65..de71b0d 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_osdep.h +++ b/lib/librte_pmd_i40e/i40e/i40e_osdep.h @@ -100,10 +100,10 @@ typedef enum i40e_status_code i40e_status; #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) #define ASSERT(x) if(!(x)) rte_panic("IXGBE: x") -#define DEBUGOUT(S) PMD_DRV_LOG(DEBUG, S) -#define DEBUGOUT1(S, A...) PMD_DRV_LOG(DEBUG, S, ##A) +#define DEBUGOUT(S) PMD_DRV_LOG_RAW(DEBUG, S) +#define DEBUGOUT1(S, A...) PMD_DRV_LOG_RAW(DEBUG, S, ##A) -#define DEBUGFUNC(F) DEBUGOUT(F) +#define DEBUGFUNC(F) DEBUGOUT(F "\n") #define DEBUGOUT2 DEBUGOUT1 #define DEBUGOUT3 DEBUGOUT2 #define DEBUGOUT6 DEBUGOUT3 @@ -112,7 +112,7 @@ typedef enum i40e_status_code i40e_status; #define i40e_debug(h, m, s, ...) \ do { \ if (((m) & (h)->debug_mask)) \ - PMD_DRV_LOG(DEBUG, "i40e %02x.%x " s, \ + PMD_DRV_LOG_RAW(DEBUG, "i40e %02x.%x " s, \ (h)->bus.device, (h)->bus.func, \ ##__VA_ARGS__); \ } while (0) diff --git a/lib/librte_pmd_i40e/i40e_logs.h b/lib/librte_pmd_i40e/i40e_logs.h index f991dd2..043ecba 100644 --- a/lib/librte_pmd_i40e/i40e_logs.h +++ b/lib/librte_pmd_i40e/i40e_logs.h @@ -65,10 +65,13 @@ #endif #ifdef RTE_LIBRTE_I40E_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 /* _I40E_LOGS_H_ */ -- 1.7.10.4