DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, shreyansh.jain@nxp.com
Subject: [dpdk-dev] [PATCH 5/5] bus/dpaa: improve the dynamic logging
Date: Wed, 25 Apr 2018 18:27:02 +0530	[thread overview]
Message-ID: <1524661022-21484-5-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1524661022-21484-1-git-send-email-hemant.agrawal@nxp.com>

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman.c |  2 +-
 drivers/bus/dpaa/dpaa_bus.c       | 16 +++++-----------
 drivers/bus/dpaa/rte_dpaa_logs.h  | 11 ++++++-----
 3 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index be91da4..bdb7004 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -504,7 +504,7 @@ fman_if_init(const struct device_node *dpa_node)
 
 	/* Parsing of the network interface is complete, add it to the list */
 	DPAA_BUS_LOG(DEBUG, "Found %s, Tx Channel = %x, FMAN = %x,"
-		    "Port ID = %x\n",
+		    "Port ID = %x",
 		    dname, __if->__if.tx_channel_id, __if->__if.fman_idx,
 		    __if->__if.mac_idx);
 
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 2b85c9e..2046206 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -178,7 +178,7 @@ dpaa_create_device_list(void)
 		memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN);
 		sprintf(dev->name, "fm%d-mac%d", (fman_intf->fman_idx + 1),
 			fman_intf->mac_idx);
-		DPAA_BUS_LOG(DEBUG, "Device added: %s", dev->name);
+		DPAA_BUS_LOG(INFO, "%s netdev added", dev->name);
 		dev->device.name = dev->name;
 		dev->device.devargs = dpaa_devargs_lookup(dev);
 
@@ -216,7 +216,7 @@ dpaa_create_device_list(void)
 		 */
 		memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN);
 		sprintf(dev->name, "dpaa-sec%d", i);
-		DPAA_BUS_LOG(DEBUG, "Device added: %s", dev->name);
+		DPAA_BUS_LOG(INFO, "%s cryptodev added", dev->name);
 		dev->device.name = dev->name;
 		dev->device.devargs = dpaa_devargs_lookup(dev);
 
@@ -461,14 +461,11 @@ rte_dpaa_bus_scan(void)
 		return 0;
 	}
 
-	DPAA_BUS_LOG(DEBUG, "Bus: Address of netcfg=%p, Ethports=%d",
-		     dpaa_netcfg, dpaa_netcfg->num_ethports);
-
 #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
 	dump_netcfg(dpaa_netcfg);
 #endif
 
-	DPAA_BUS_LOG(DEBUG, "Number of devices = %d\n",
+	DPAA_BUS_LOG(DEBUG, "Number of ethernet devices = %d",
 		     dpaa_netcfg->num_ethports);
 	ret = dpaa_create_device_list();
 	if (ret) {
@@ -486,9 +483,6 @@ rte_dpaa_bus_scan(void)
 		return ret;
 	}
 
-	DPAA_BUS_LOG(DEBUG, "dpaa_portal_key=%u, ret=%d\n",
-		    (unsigned int)dpaa_portal_key, ret);
-
 	return 0;
 }
 
@@ -644,11 +638,11 @@ dpaa_init_log(void)
 	if (dpaa_logtype_mempool >= 0)
 		rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE);
 
-	dpaa_logtype_pmd = rte_log_register("pmd.dpaa");
+	dpaa_logtype_pmd = rte_log_register("pmd.net.dpaa");
 	if (dpaa_logtype_pmd >= 0)
 		rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE);
 
-	dpaa_logtype_eventdev = rte_log_register("eventdev.dpaa");
+	dpaa_logtype_eventdev = rte_log_register("pmd.event.dpaa");
 	if (dpaa_logtype_eventdev >= 0)
 		rte_log_set_level(dpaa_logtype_eventdev, RTE_LOG_NOTICE);
 }
diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h
index 0fd70bb..e414354 100644
--- a/drivers/bus/dpaa/rte_dpaa_logs.h
+++ b/drivers/bus/dpaa/rte_dpaa_logs.h
@@ -15,10 +15,7 @@ extern int dpaa_logtype_pmd;
 extern int dpaa_logtype_eventdev;
 
 #define DPAA_BUS_LOG(level, fmt, args...) \
-	rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \
-		__func__, ##args)
-
-#define BUS_INIT_FUNC_TRACE() DPAA_BUS_LOG(DEBUG, " >>")
+	rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "dpaa: " fmt "\n", ##args)
 
 #ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
 #define DPAA_BUS_HWWARN(cond, fmt, args...) \
@@ -31,7 +28,11 @@ extern int dpaa_logtype_eventdev;
 #endif
 
 #define DPAA_BUS_DEBUG(fmt, args...) \
-	DPAA_BUS_LOG(DEBUG, fmt, ## args)
+	rte_log(RTE_LOG_DEBUG, dpaa_logtype_bus, "dpaa: %s(): " fmt "\n", \
+		__func__, ##args)
+
+#define BUS_INIT_FUNC_TRACE() DPAA_BUS_DEBUG(" >>")
+
 #define DPAA_BUS_INFO(fmt, args...) \
 	DPAA_BUS_LOG(INFO, fmt, ## args)
 #define DPAA_BUS_ERR(fmt, args...) \
-- 
2.7.4

  parent reply	other threads:[~2018-04-25 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 12:56 [dpdk-dev] [PATCH 1/5] bus/dpaa: support device blacklisting Hemant Agrawal
2018-04-25 12:56 ` [dpdk-dev] [PATCH 2/5] bus/fslmc: " Hemant Agrawal
2018-04-25 12:57 ` [dpdk-dev] [PATCH 3/5] bus/fslmc: minor improvements in debug logging Hemant Agrawal
2018-04-25 12:57 ` [dpdk-dev] [PATCH 4/5] net/dpaa: fix the xstats implementation Hemant Agrawal
2018-04-25 12:57 ` Hemant Agrawal [this message]
2018-05-09  5:41 ` [dpdk-dev] [PATCH 1/5] bus/dpaa: support device blacklisting Shreyansh Jain
2018-05-13 22:38   ` Thomas Monjalon

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=1524661022-21484-5-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shreyansh.jain@nxp.com \
    /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).