From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by dpdk.org (Postfix) with ESMTP id A703EB4E0 for ; Sat, 14 Feb 2015 16:33:12 +0100 (CET) Received: by mail-ig0-f175.google.com with SMTP id hn18so16151273igb.2 for ; Sat, 14 Feb 2015 07:33:12 -0800 (PST) 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; bh=KOk6XwLgWcV5SjhQ1d3+PviGpeT8Ui/ZrH/LAHy4ZVg=; b=FuYlrPVBpmgARLkilGE9qVvGdVG6XDMFUps6eJpkkRZOBkfQeS3oQ+S3RtO6hrkNDl TiT4ZDCASmTk89SSbRmqZlwKIQG2uaVpgvNfuX9USWTiq00Nfg8ZCqSa28uJOznpgXuM PlaMX67fh76qhzKsG3MKqvD67VFymUMje0S3jvSE57dl9ahaszE1p02ASWoHlMNdFiOI GfdDTpWn/q11QKn/OBnUBAXc4ZKZ091uIUryAmKlNLjufM1fvz0AJkj0ke7qpsHC3HUd X1RALo1JZZOmwL7nID2aGc4N12ZBpbqRQy2Ls7nYhKifnksCFUWtYbfafTnfHNKmx7eS 5eHg== X-Gm-Message-State: ALoCoQl8qJ4eXyB6tDUse7/5yFFcBMUAMroTatGJSRco3Eh4lI+iDyRnk8ENLnVbeR9iXkULSsPv X-Received: by 10.107.148.7 with SMTP id w7mr19263986iod.73.1423927991935; Sat, 14 Feb 2015 07:33:11 -0800 (PST) Received: from uryu.home.lan ([67.210.173.2]) by mx.google.com with ESMTPSA id z9sm5136730igw.21.2015.02.14.07.33.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Feb 2015 07:33:11 -0800 (PST) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: dev@dpdk.org Date: Sat, 14 Feb 2015 10:32:58 -0500 Message-Id: <1423927979-13607-1-git-send-email-shemming@brocade.com> X-Mailer: git-send-email 2.1.4 Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH 1/2] enic: replace use of printf with log 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: Sat, 14 Feb 2015 15:33:13 -0000 Device driver should log via DPDK log, not to printf which is sends to /dev/null in a daemon application. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_enic/enic_compat.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h index b1af838..c3ab76e 100644 --- a/lib/librte_pmd_enic/enic_compat.h +++ b/lib/librte_pmd_enic/enic_compat.h @@ -75,10 +75,13 @@ #define kzalloc(size, flags) calloc(1, size) #define kfree(x) free(x) -#define dev_err(x, args...) printf("rte_enic_pmd : Error - " args) -#define dev_info(x, args...) printf("rte_enic_pmd: Info - " args) -#define dev_warning(x, args...) printf("rte_enic_pmd: Warning - " args) -#define dev_trace(x, args...) printf("rte_enic_pmd: Trace - " args) +#define dev_printk(level, fmt, args...) \ + RTE_LOG(level, PMD, "rte_enic_pmd:" fmt, ## args) + +#define dev_err(x, args...) dev_printk(ERR, args) +#define dev_info(x, args...) dev_printk(INFO, args) +#define dev_warning(x, args...) dev_printk(WARNING, args) +#define dev_debug(x, args...) dev_printk(DEBUG, args) #define __le16 u16 #define __le32 u32 -- 2.1.4