From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id CAAFB8DA5 for ; Wed, 25 Apr 2018 17:45:56 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id l2so297506pgc.7 for ; Wed, 25 Apr 2018 08:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GOkPbSWoEV6naE3ijsGiCOtWW2BCy27SMWRWbeZPGRE=; b=vCq6rhuasI+PAWXFOs9xAiIln9HFoP3Ln271AB29B6DY11Zp1sfoNlnOsd8h4dzWfz j0Lm+xrICDlwOwicbbPND3PBLoOdNJ4GVg/b3xonawtK0+lkI/t9i1uoqooc2Z9kmCKe j2Z0mIjRTssilO/pa80TnNSdiJKj0F4Kb1hyaT6vYQajNZsGnCM+JnSV5glomcUcdxFu OmOJzy3ku/tSau9p2sx5/Bk8lkWh+1XT2/vjZ470/FMVNP2DkL7g/VPTSCCqwMZq5jem uuNn/f5Bt/48kMOI4vHGWmQwowrpWWoIgxhYF0w5TpuqIfOEK36nYYVB8HwTg4o9bmHM pWWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GOkPbSWoEV6naE3ijsGiCOtWW2BCy27SMWRWbeZPGRE=; b=QXswY/f73un7DSoouSbSW+Xr6Yci1kuIOteSGAOef/MOdERxGMSIAcoiMfxXDUJhvN kaEIhYVrhGfZbka0gT79dbqwE3EVwczByBgQFARvuVR9uPviH6zzaeFw0q+raaR+DO+s ZVYmJJLBRVm/72p0io5xeO1OZWcwNFQQFCrYV3jokqpZYWvdXzSK7TyTkByC8hdEmPjK hheNBtire/pxQHkVCpE7ilLIZXhDhMGo2oxWVJt6XZTSaY5y9UeyY/20BQZwdBQS9FZv +w7LSU/Uk/5SxrEA68KykORy5DX8g/S2Q3IH1rJ927p+1Cw1qBOjQGs6TUW/qjh4yTJX qy8w== X-Gm-Message-State: ALQs6tATnrXEb8FUhDD64v3GVUKaalzfSRMvsAGREQRu7XYHgrFbyKCT qnZQhjBz3MqRD5B0H9H7QQ3dJc10V7I= X-Google-Smtp-Source: AIpwx48AXV/YZv3IXhctkYtP4ulMNPyKuHgfjuoLbRecXBjxCgLmcC9bQQi4e+B7704uA5PHWHBmyQ== X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr20574505pll.271.1524671155937; Wed, 25 Apr 2018 08:45:55 -0700 (PDT) Received: from xeon-e3.lan (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id b89sm8115152pfd.85.2018.04.25.08.45.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 08:45:55 -0700 (PDT) From: Stephen Hemminger To: alejandro.lucero@netronome.com Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 25 Apr 2018 08:45:48 -0700 Message-Id: <20180425154551.6795-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425154551.6795-1-stephen@networkplumber.org> References: <20180425154551.6795-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 2/5] net/nfp: add implied new line to PMD_DRV_LOG X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 15:45:57 -0000 The PMD_INIT_LOG macro always adds a newline, and other drivers version of PMD_DRV_LOG always adds a newline. Therefore change nfp driver to be consitent with others. Signed-off-by: Stephen Hemminger --- drivers/net/nfp/nfp_net.c | 22 +++++++++++----------- drivers/net/nfp/nfp_net_logs.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index bedd4b668711..bf9d821c8c21 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -294,7 +294,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t update) uint32_t new; struct timespec wait; - PMD_DRV_LOG(DEBUG, "Writing to the configuration queue (%p)...\n", + PMD_DRV_LOG(DEBUG, "Writing to the configuration queue (%p)...", hw->qcp_cfg); if (hw->qcp_cfg == NULL) @@ -305,7 +305,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t update) wait.tv_sec = 0; wait.tv_nsec = 1000000; - PMD_DRV_LOG(DEBUG, "Polling for update ack...\n"); + PMD_DRV_LOG(DEBUG, "Polling for update ack..."); /* Poll update field, waiting for NFP to ack the config */ for (cnt = 0; ; cnt++) { @@ -323,7 +323,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t update) } nanosleep(&wait, 0); /* waiting for a 1ms */ } - PMD_DRV_LOG(DEBUG, "Ack DONE\n"); + PMD_DRV_LOG(DEBUG, "Ack DONE"); return 0; } @@ -341,7 +341,7 @@ nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t ctrl, uint32_t update) { uint32_t err; - PMD_DRV_LOG(DEBUG, "nfp_net_reconfig: ctrl=%08x update=%08x\n", + PMD_DRV_LOG(DEBUG, "nfp_net_reconfig: ctrl=%08x update=%08x", ctrl, update); rte_spinlock_lock(&hw->reconfig_lock); @@ -983,7 +983,7 @@ nfp_net_promisc_enable(struct rte_eth_dev *dev) uint32_t new_ctrl, update = 0; struct nfp_net_hw *hw; - PMD_DRV_LOG(DEBUG, "Promiscuous mode enable\n"); + PMD_DRV_LOG(DEBUG, "Promiscuous mode enable"); hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); @@ -993,7 +993,7 @@ nfp_net_promisc_enable(struct rte_eth_dev *dev) } if (hw->ctrl & NFP_NET_CFG_CTRL_PROMISC) { - PMD_DRV_LOG(INFO, "Promiscuous mode already enabled\n"); + PMD_DRV_LOG(INFO, "Promiscuous mode already enabled"); return; } @@ -1019,7 +1019,7 @@ nfp_net_promisc_disable(struct rte_eth_dev *dev) hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); if ((hw->ctrl & NFP_NET_CFG_CTRL_PROMISC) == 0) { - PMD_DRV_LOG(INFO, "Promiscuous mode already disabled\n"); + PMD_DRV_LOG(INFO, "Promiscuous mode already disabled"); return; } @@ -1061,7 +1061,7 @@ nfp_net_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) [NFP_NET_CFG_STS_LINK_RATE_100G] = ETH_SPEED_NUM_100G, }; - PMD_DRV_LOG(DEBUG, "Link update\n"); + PMD_DRV_LOG(DEBUG, "Link update"); hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); @@ -1085,9 +1085,9 @@ nfp_net_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) ret = rte_eth_linkstatus_set(dev, &link); if (ret == 0) { if (link.link_status) - PMD_DRV_LOG(INFO, "NIC Link is Up\n"); + PMD_DRV_LOG(INFO, "NIC Link is Up"); else - PMD_DRV_LOG(INFO, "NIC Link is Down\n"); + PMD_DRV_LOG(INFO, "NIC Link is Down"); } return ret; } @@ -1472,7 +1472,7 @@ nfp_net_dev_interrupt_handler(void *param) struct rte_eth_link link; struct rte_eth_dev *dev = (struct rte_eth_dev *)param; - PMD_DRV_LOG(DEBUG, "We got a LSC interrupt!!!\n"); + PMD_DRV_LOG(DEBUG, "We got a LSC interrupt!!!"); rte_eth_linkstatus_get(dev, &link); diff --git a/drivers/net/nfp/nfp_net_logs.h b/drivers/net/nfp/nfp_net_logs.h index 2917da56ced3..1641de2ba863 100644 --- a/drivers/net/nfp/nfp_net_logs.h +++ b/drivers/net/nfp/nfp_net_logs.h @@ -59,6 +59,6 @@ extern int nfp_logtype_init; extern int nfp_logtype_driver; #define PMD_DRV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \ - "%s(): " fmt, __func__, ## args) + "%s(): " fmt "\n", __func__, ## args) #endif /* _NFP_NET_LOGS_H_ */ -- 2.17.0