From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [RESEND v2 2/7] mempool/dpaa2: change to dynamic logging Date: Wed, 21 Mar 2018 11:57:58 +0530 Message-ID: <75a5309c-a3ff-135f-7756-b50220b4c74e@nxp.com> References: <20180312092547.18472-1-shreyansh.jain@nxp.com> <20180313054431.19556-1-shreyansh.jain@nxp.com> <20180313054431.19556-3-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com To: Shreyansh Jain , ferruh.yigit@intel.com Return-path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0042.outbound.protection.outlook.com [104.47.2.42]) by dpdk.org (Postfix) with ESMTP id B8888AAB7 for ; Wed, 21 Mar 2018 07:28:14 +0100 (CET) In-Reply-To: <20180313054431.19556-3-shreyansh.jain@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Shreyansh, On 3/13/2018 11:14 AM, Shreyansh Jain wrote: > Signed-off-by: Shreyansh Jain > --- > drivers/mempool/dpaa2/Makefile | 6 --- > drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 60 +++++++++++++++++---------- > drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 38 +++++++++++++++++ > 3 files changed, 75 insertions(+), 29 deletions(-) > create mode 100644 drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h > > .. diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > index 1a618ae1b..6e8b7068e 100644 > --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > @@ -27,10 +27,14 @@ > #include > #include > #include "dpaa2_hw_mempool.h" > +#include "dpaa2_hw_mempool_logs.h" > > struct dpaa2_bp_info rte_dpaa2_bpid_info[MAX_BPID]; > static struct dpaa2_bp_list *h_bp_list; > > +/* Dynamic logging identified for mempool */ > +int dpaa2_logtype_mempool; > + > static int > rte_hw_mbuf_create_pool(struct rte_mempool *mp) > { > @@ -44,30 +48,30 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp) > avail_dpbp = dpaa2_alloc_dpbp_dev(); > > if (!avail_dpbp) { > - PMD_DRV_LOG(ERR, "DPAA2 resources not available"); > + DPAA2_MEMPOOL_ERR("DPAA2 resources not available"); Can you change it to "DPAA2 pool not available ..." > .. > > @@ -280,8 +284,8 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, > * in pool, qbman_swp_acquire returns 0 > */ > if (ret <= 0) { > - PMD_TX_LOG(ERR, "Buffer acquire failed with" > - " err code: %d", ret); > + DPAA2_MEMPOOL_ERR("Buffer acquire failed with" > + " err code: %d", ret); > /* The API expect the exact number of requested bufs */ > /* Releasing all buffers allocated */ > rte_dpaa2_mbuf_release(pool, obj_table, bpid, > @@ -293,7 +297,8 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, > DPAA2_MODIFY_IOVA_TO_VADDR(bufs[i], size_t); > obj_table[n] = (struct rte_mbuf *) > (bufs[i] - bp_info->meta_data_size); > - PMD_TX_LOG(DEBUG, "Acquired %p address %p from BMAN", > + DPAA2_MEMPOOL_DP_DEBUG( > + "Acquired %p address %p from BMAN\n", > (void *)bufs[i], (void *)obj_table[n]); > n++; > } > @@ -301,8 +306,8 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, > > #ifdef RTE_LIBRTE_DPAA2_DEBUG_DRIVER you have maintained "RTE_LIBRTE_DPAA2_DEBUG_DRIVER" flag here, but you are removing it in next patch from config?