From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id 3D875B3C9 for ; Mon, 1 Sep 2014 12:20:34 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id u57so5171552wes.23 for ; Mon, 01 Sep 2014 03:25:01 -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=gwA8vsT1TTgzoWJiU4y/b61oNly4itlDptotES2IdNA=; b=RvIJQdKk13VVZR8X2Za1j17x/ogQIZsaJggUkWk6kjALDTQcU39Aep1yNoGwqxYoiM 5ELCZgyo6yBLGMwevQzuVZx84chG7UwqFvhH3BVfgSYclBUM/+MaCmfnDCWkk6s8Exo9 V7DexUu8HQBnx1XKLhKgCzMcqcEZVNLdmwvb+Q4+fIIUqBdmo14DrMkWv8c0tlMEug21 YyHQWpS1kUrBgEP3BiLi/Y0IP4AMukRengpFQYgpEgFHl5Dw4hCUGw0NTlLjhmOWgHFA 20ln3mO/VGGdNIf0Y0R77N9iMUx/GY9bSitUA5FPRWfr+yxvlic362fulAHaw3vUlCQt BqjA== X-Gm-Message-State: ALoCoQlaBE05gX/P6Rhnh2b/+aRfFujle/oKe/5h9AhUhPsAtly4oTX7ufXdn0946uOdD3V2/Zcj X-Received: by 10.180.87.66 with SMTP id v2mr6058663wiz.28.1409567101155; Mon, 01 Sep 2014 03:25:01 -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.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:25:00 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:24:31 +0200 Message-Id: <1409567080-27083-9-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 08/17] 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: Mon, 01 Sep 2014 10:20:34 -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_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