From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D714E2C58 for ; Mon, 12 Mar 2018 12:04:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 04:04:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,460,1515484800"; d="scan'208";a="210824822" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by fmsmga006.fm.intel.com with ESMTP; 12 Mar 2018 04:04:43 -0700 To: Shreyansh Jain Cc: dev@dpdk.org, hemant.agrawal@nxp.com, akhil.goyal@nxp.com, nipun.gupta@nxp.com References: <20180312092547.18472-1-shreyansh.jain@nxp.com> <20180312092547.18472-4-shreyansh.jain@nxp.com> From: Ferruh Yigit Message-ID: Date: Mon, 12 Mar 2018 11:04:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180312092547.18472-4-shreyansh.jain@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 3/7] net/dpaa2: change into dynamic logging 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: , X-List-Received-Date: Mon, 12 Mar 2018 11:04:46 -0000 On 3/12/2018 9:25 AM, Shreyansh Jain wrote: > Signed-off-by: Shreyansh Jain <...> > @@ -188,11 +188,6 @@ CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y > # Compile burst-oriented NXP DPAA2 PMD driver > # > CONFIG_RTE_LIBRTE_DPAA2_PMD=n > -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n > -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n > -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n > -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n > -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n Just to double check, are you sure to remove data path logging config options too (RX, TX, TX_FREE)? <...> > @@ -557,6 +536,27 @@ for details. > Done > testpmd> > > +Enabling logs > +------------- > + > +For enabling logging for DPAA2 PMD, following log-level prefix can be used: > + > + .. code-block:: console > + > + --log-level=bus.fslmc, -- ... > + > +Using ``bus.fslmc`` as log matching criteria, all FSLMC bus logs can be enabled > +which are lower than logging ``level``. > + > + Or > + > + .. code-block:: console > + > + --log-level=pmd.dpaa2, -- ... Reminder, this will be also effected from naming change (pmd.net.dpaa2) <...> > @@ -2045,3 +2046,12 @@ static struct rte_dpaa2_driver rte_dpaa2_pmd = { > }; > > RTE_PMD_REGISTER_DPAA2(net_dpaa2, rte_dpaa2_pmd); > + > +RTE_INIT(dpaa2_pmd_init_log); > +static void > +dpaa2_pmd_init_log(void) > +{ > + dpaa2_logtype_pmd = rte_log_register("pmd.dpaa2"); After commit [1] naming changed to "pmd.net.dpaa2" [1] Commit: 7db274b9ada2 ("doc: describe dynamic logging format") <...> > +/* DP Logs, toggled out at compile time if level lower than current level */ > +#define DPAA2_PMD_DP_LOG(level, fmt, args...) \ > + RTE_LOG_DP(level, PMD, fmt, ## args) > + > +#define DPAA2_PMD_DP_DEBUG(fmt, args...) \ > + DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args) > +#define DPAA2_PMD_DP_INFO(fmt, args...) \ > + DPAA2_PMD_DP_LOG(INFO, fmt, ## args) > +#define DPAA2_PMD_DP_WARN(fmt, args...) \ > + DPAA2_PMD_DP_LOG(WARNING, fmt, ## args) Just a reminder about using RTE_LOG_DP without config wrapper to disable them, not all code will be removed in compilation time, only ones with log_level > RTE_LOG_DP_LEVEL, so with default config DPAA2_PMD_DP_WARN() ones will not be removed. This can be OK or not based on your usage but this may effect your datapath. <...>