From: Stephen Hemminger <stephen@networkplumber.org>
To: alejandro.lucero@netronome.com
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 2/5] net/nfp: add implied new line to PMD_DRV_LOG
Date: Wed, 25 Apr 2018 08:45:48 -0700 [thread overview]
Message-ID: <20180425154551.6795-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20180425154551.6795-1-stephen@networkplumber.org>
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 <stephen@networkplumber.org>
---
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
next prev parent reply other threads:[~2018-04-25 15:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 15:45 [dpdk-dev] [PATCH 0/5] net/nfp logging fixes Stephen Hemminger
2018-04-25 15:45 ` [dpdk-dev] [PATCH 1/5] net/nfp: use correct logtype for init messages Stephen Hemminger
2018-04-25 15:45 ` Stephen Hemminger [this message]
2018-04-25 15:45 ` [dpdk-dev] [PATCH 3/5] net/nfp: fix double space in init log Stephen Hemminger
2018-04-25 15:45 ` [dpdk-dev] [PATCH 4/5] net/nfl: add newline in PMD_RX/TX_LOG macros Stephen Hemminger
2018-04-25 15:45 ` [dpdk-dev] [PATCH 5/5] net/nfp: use dynamic logging everywhere Stephen Hemminger
2018-04-26 12:52 ` [dpdk-dev] [PATCH 0/5] net/nfp logging fixes Alejandro Lucero
2018-04-26 15:42 ` Stephen Hemminger
2018-04-26 18:14 ` Alejandro Lucero
2018-04-26 21:52 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180425154551.6795-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).