From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: "thomas@monjalon.net" <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Shreyansh Jain <shreyansh.jain@nxp.com>
Subject: [dpdk-dev] [PATCH 1/3] common/dpaax: reduce logging level
Date: Wed, 17 Oct 2018 09:12:26 +0000 [thread overview]
Message-ID: <20181017091151.15017-2-shreyansh.jain@nxp.com> (raw)
In-Reply-To: <20181017091151.15017-1-shreyansh.jain@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.c | 35 +++++++++++++------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 075053b1a..213f75dff 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -69,8 +69,8 @@ read_memory_node(unsigned int *count)
ret = glob(MEM_NODE_PATH_GLOB, 0, NULL, &result);
if (ret != 0) {
- DPAAX_ERR("Unable to glob device-tree memory node: (%s)(%d)",
- MEM_NODE_PATH_GLOB, ret);
+ DPAAX_DEBUG("Unable to glob device-tree memory node: (%s)(%d)",
+ MEM_NODE_PATH_GLOB, ret);
goto out;
}
@@ -78,8 +78,8 @@ read_memory_node(unsigned int *count)
/* Either more than one memory@<addr> node found, or none.
* In either case, cannot work ahead.
*/
- DPAAX_ERR("Found (%zu) entries in device-tree. Not supported!",
- result.gl_pathc);
+ DPAAX_DEBUG("Found (%zu) entries in device-tree. Not supported!",
+ result.gl_pathc);
goto out;
}
@@ -87,28 +87,29 @@ read_memory_node(unsigned int *count)
result.gl_pathv[0]);
fd = open(result.gl_pathv[0], O_RDONLY);
if (fd < 0) {
- DPAAX_ERR("Unable to open the device-tree node: (%s)(fd=%d)",
- MEM_NODE_PATH_GLOB, fd);
+ DPAAX_DEBUG("Unable to open the device-tree node: (%s)(fd=%d)",
+ MEM_NODE_PATH_GLOB, fd);
goto cleanup;
}
/* Stat to get the file size */
ret = fstat(fd, &statbuf);
if (ret != 0) {
- DPAAX_ERR("Unable to get device-tree memory node size.");
+ DPAAX_DEBUG("Unable to get device-tree memory node size.");
goto cleanup;
}
DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size);
if (statbuf.st_size > MEM_NODE_FILE_LEN) {
- DPAAX_WARN("More memory nodes available than assumed.");
- DPAAX_WARN("System may not work properly!");
+ DPAAX_DEBUG("More memory nodes available than assumed.");
+ DPAAX_DEBUG("System may not work properly!");
}
ret = read(fd, file_data, statbuf.st_size > MEM_NODE_FILE_LEN ?
MEM_NODE_FILE_LEN : statbuf.st_size);
if (ret <= 0) {
- DPAAX_ERR("Unable to read device-tree memory node: (%d)", ret);
+ DPAAX_DEBUG("Unable to read device-tree memory node: (%d)",
+ ret);
goto cleanup;
}
@@ -117,15 +118,15 @@ read_memory_node(unsigned int *count)
*/
*count = (statbuf.st_size / 16);
if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) {
- DPAAX_ERR("Invalid memory node values or count. (size=%lu)",
- statbuf.st_size);
+ DPAAX_DEBUG("Invalid memory node values or count. (size=%lu)",
+ statbuf.st_size);
goto cleanup;
}
/* each entry is of 16 bytes, and size/16 is total count of entries */
nodes = malloc(sizeof(struct reg_node) * (*count));
if (!nodes) {
- DPAAX_ERR("Failure in allocating working memory.");
+ DPAAX_DEBUG("Failure in allocating working memory.");
goto cleanup;
}
memset(nodes, 0, sizeof(struct reg_node) * (*count));
@@ -420,9 +421,9 @@ dpaax_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
ret = dpaax_iova_table_update(phys_addr, 0, map_len);
if (ret != 0) {
- DPAAX_ERR("PA-Table entry update failed. "
- "Map=%d, addr=%p, len=%zu, err:(%d)",
- type, va, map_len, ret);
+ DPAAX_DEBUG("PA-Table entry update failed. "
+ "Map=%d, addr=%p, len=%zu, err:(%d)",
+ type, va, map_len, ret);
return;
}
@@ -460,5 +461,5 @@ RTE_INIT(dpaax_log)
{
dpaax_logger = rte_log_register("pmd.common.dpaax");
if (dpaax_logger >= 0)
- rte_log_set_level(dpaax_logger, RTE_LOG_NOTICE);
+ rte_log_set_level(dpaax_logger, RTE_LOG_ERR);
}
--
2.17.1
next prev parent reply other threads:[~2018-10-17 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 9:12 [dpdk-dev] [PATCH 0/3] Reduce logging level for dpaax and fslmc Shreyansh Jain
2018-10-17 9:12 ` Shreyansh Jain [this message]
2018-10-17 9:16 ` [dpdk-dev] [PATCH 1/3] common/dpaax: reduce logging level Thomas Monjalon
2018-10-17 9:12 ` [dpdk-dev] [PATCH 2/3] bus/fslmc: ignore dpaax pa-va table errors Shreyansh Jain
2018-10-17 9:12 ` [dpdk-dev] [PATCH 3/3] net/dpaa2: convert logs from errors to debug Shreyansh Jain
2018-10-17 10:10 ` [dpdk-dev] [PATCH v2 0/3] Reduce logging level for dpaax and fslmc Shreyansh Jain
2018-10-17 10:10 ` [dpdk-dev] [PATCH v2 1/3] common/dpaax: reduce logging level Shreyansh Jain
2018-10-23 9:43 ` Jerin Jacob
2018-10-17 10:10 ` [dpdk-dev] [PATCH v2 2/3] bus/fslmc: ignore dpaax pa-va table errors Shreyansh Jain
2018-10-23 9:44 ` Jerin Jacob
2018-10-17 10:10 ` [dpdk-dev] [PATCH v2 3/3] net/dpaa2: convert logs from errors to debug Shreyansh Jain
2018-10-24 22:18 ` [dpdk-dev] [PATCH v2 0/3] Reduce logging level for dpaax and fslmc 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=20181017091151.15017-2-shreyansh.jain@nxp.com \
--to=shreyansh.jain@nxp.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).