From patchwork Tue Aug 27 07:07:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Saxena X-Patchwork-Id: 58005 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 563501C0B1; Tue, 27 Aug 2019 09:09:42 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 280731BFA8 for ; Tue, 27 Aug 2019 09:09:21 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 090462005CF; Tue, 27 Aug 2019 09:09:21 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 04E342005B6; Tue, 27 Aug 2019 09:09:19 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7ADED402DE; Tue, 27 Aug 2019 15:09:15 +0800 (SGT) From: Sachin Saxena To: dev@dpdk.org Cc: thomas@monjalon.net, Hemant Agrawal Date: Tue, 27 Aug 2019 12:37:10 +0530 Message-Id: <20190827070730.11206-11-sachin.saxena@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190827070730.11206-1-sachin.saxena@nxp.com> References: <20190827070730.11206-1-sachin.saxena@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v1 10/30] common/dpaax: reduce debug mesages 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hemant Agrawal Signed-off-by: Hemant Agrawal Reviewed-by: Sachin Saxena --- drivers/common/dpaax/dpaax_iova_table.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c index ae0af0919..43c9c72e6 100644 --- a/drivers/common/dpaax/dpaax_iova_table.c +++ b/drivers/common/dpaax/dpaax_iova_table.c @@ -140,7 +140,8 @@ read_memory_node(unsigned int *count) DPAAX_DEBUG("Device-tree memory node data:"); do { - DPAAX_DEBUG("\n %08" PRIx64 " %08zu", nodes[j].addr, nodes[j].len); + DPAAX_DEBUG(" %08" PRIx64 " %08zu", + nodes[j].addr, nodes[j].len); } while (--j); cleanup: @@ -241,7 +242,7 @@ dpaax_iova_table_populate(void) /* Release memory associated with nodes array - not required now */ free(nodes); - DPAAX_DEBUG("Adding mem-event handler\n"); + DPAAX_DEBUG("Adding mem-event handler"); ret = dpaax_handle_memevents(); if (ret) { DPAAX_ERR("Unable to add mem-event handler"); @@ -306,10 +307,11 @@ dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length) * case. */ entry[i].pages[e_offset] = align_vaddr; +#ifdef RTE_COMMON_DPAAX_DEBUG DPAAX_DEBUG("Added: vaddr=%zu for Phy:%"PRIu64" at %zu" " remaining len %zu", align_vaddr, align_paddr, e_offset, req_length); - +#endif /* Incoming request can be larger than the * DPAAX_MEM_SPLIT size - in which case, multiple * entries in entry->pages[] are filled up. @@ -336,10 +338,11 @@ dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length) vaddr, paddr); return -1; } - +#ifdef RTE_COMMON_DPAAX_DEBUG DPAAX_DEBUG("Add: Found slot at (%"PRIu64")[(%zu)] for vaddr:(%p)," " phy(%"PRIu64"), len(%zu)", entry[i].start, e_offset, vaddr, paddr, length); +#endif return 0; } @@ -404,13 +407,13 @@ dpaax_memevent_cb(enum rte_mem_event type, const void *addr, size_t len, phys_addr = rte_mem_virt2phy(ms->addr); virt_addr = ms->addr; map_len = ms->len; - +#ifdef RTE_COMMON_DPAAX_DEBUG DPAAX_DEBUG("Request for %s, va=%p, virt_addr=%p," "iova=%"PRIu64", map_len=%zu", type == RTE_MEM_EVENT_ALLOC ? "alloc" : "dealloc", va, virt_addr, phys_addr, map_len); - +#endif if (type == RTE_MEM_EVENT_ALLOC) ret = dpaax_iova_table_update(phys_addr, virt_addr, map_len);