From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id B8200B39B for ; Wed, 17 Sep 2014 15:41:21 +0200 (CEST) Received: by mail-wg0-f43.google.com with SMTP id x12so1410125wgg.26 for ; Wed, 17 Sep 2014 06:47:02 -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=2OeTnJcb0efjUsmBmmPlSvhLlQkQSBnN2F+tkwj/2ag=; b=PdfaaANaNvGVSvJnz9C38RMtXCzWHyO+bLL8UeQGZD+uaXhK4ecPYxwPZJ0IJRT9yW q3PbIldgyNm/H1dnfGVcLR6HiVbyve1bNn6kqO1XrveNU7Gn+mpIff2oMQMypZD3S8kw tvvcWU/oJHLHZDsr/8XJwqH/HhgRBRXWAOz9uO7QY77C1PiXABOFN1qDBu8GFHYMas7N YWc443r5zOLrDIxVrj0Ckerxo/c9yhfL2lCHI3iJvF5SQpPOcRO9PRYcg6SYnoA2jKes ySHIgNrBrZNyqA4IoAwjRLUTgGsmHo5oLs/XN03zLuLAWRQfuurWMjFaqjTG3bOJgd5s mljw== X-Gm-Message-State: ALoCoQkDxBIw+DE/6/md3CeQXzguDiKpfKz5k4JQMgTSX1NV6yndQM9lVRcCfQSaxtrKHNKaFZlj X-Received: by 10.194.76.195 with SMTP id m3mr2680051wjw.136.1410961622534; Wed, 17 Sep 2014 06:47:02 -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.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 06:47:01 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Wed, 17 Sep 2014 15:46:34 +0200 Message-Id: <1410961612-8571-3-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 02/20] 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: Wed, 17 Sep 2014 13:41: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 Acked-by: Bruce Richardson --- 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