From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D518CA00E6 for ; Wed, 20 Mar 2019 08:36:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A83464C9D; Wed, 20 Mar 2019 08:36:43 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3D1EB11A4; Wed, 20 Mar 2019 08:36:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 00:36:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,248,1549958400"; d="scan'208";a="143533765" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 20 Mar 2019 00:36:39 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Mar 2019 00:36:39 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Mar 2019 00:36:32 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.223]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 15:36:30 +0800 From: "Pei, Andy" To: "Xu, Rosen" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] raw/ifpga: modify log output. Thread-Index: AQHU2kuRbb85JvzXKEKAdgeQpJbwdaYSTOowgABQb3CAAC2qEIABX3+g Date: Wed, 20 Mar 2019 07:36:30 +0000 Message-ID: <5941F446C088714A85408FA3132CFCBB6597B5@SHSMSX101.ccr.corp.intel.com> References: <1552556863-35966-1-git-send-email-andy.pei@intel.com> <0E78D399C70DA940A335608C6ED296D73A613AE2@SHSMSX104.ccr.corp.intel.com> <5941F446C088714A85408FA3132CFCBB658D49@SHSMSX101.ccr.corp.intel.com> <0E78D399C70DA940A335608C6ED296D73A615E09@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0E78D399C70DA940A335608C6ED296D73A615E09@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjVkZGU4M2MtYmEyNy00YjJjLWFiMzQtYTY5ZmE3NmYyNmU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicWNoM3ZEY3BBOWZuMFo1VlhaNGt0M0NTXC9CMk1UMmdXamRnWHd6SGVpU2d4U1ZEZlpGYkpxdG1oblFKRGRFMnEifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] raw/ifpga: modify log output. 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" Message-ID: <20190320073630.wwG0CgEh8pjuE8e1l1M7BmFb2Iv0ebT_GUkWAPvfjrg@z> Yes, I will do this way in v2. -----Original Message----- From: Xu, Rosen=20 Sent: Tuesday, March 19, 2019 6:41 PM To: Pei, Andy ; dev@dpdk.org Cc: stable@dpdk.org Subject: RE: [PATCH] raw/ifpga: modify log output. Hi Andy, Get your point, and my reply is online. > -----Original Message----- > From: Pei, Andy > Sent: Tuesday, March 19, 2019 15:56 > To: Xu, Rosen ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH] raw/ifpga: modify log output. >=20 > Hi, Rosen: >=20 > Yes. > Original code just print "ifpga:>>". > After the patch, function name will be printed out ,like=20 > "ifpga:XXXX()", and every log info will goes in a new line. >=20 > -----Original Message----- > From: Xu, Rosen > Sent: Tuesday, March 19, 2019 11:09 AM > To: Pei, Andy ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH] raw/ifpga: modify log output. >=20 > Hi, >=20 > This macro IFPGA_RAWDEV_PMD_FUNC_TRACE is very useful for developer. > To enable this macro, pls follow these guides: > 1. enable gcc debug mode such as options: EXTRA_CFLAGS=3D'-O0 -g' > 2. add this option in testpmd startup: --log-level=3Ddriver.raw.init,8 >=20 > > -----Original Message----- > > From: Pei, Andy > > Sent: Thursday, March 14, 2019 17:48 > > To: dev@dpdk.org > > Cc: Pei, Andy ; Xu, Rosen ;=20 > > stable@dpdk.org > > Subject: [PATCH] raw/ifpga: modify log output. > > > > print function name in IFPGA_RAWDEV_PMD_FUNC_TRACE. > > The original code just print ">>", no other useful infomation is printe= d. > > A new line goes after every IFPGA log. > > > > Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver") > > Cc: rosen.xu@intel.com > > Cc: andy.pei@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Andy Pei > > --- > > drivers/raw/ifpga_rawdev/ifpga_rawdev.h | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.h > > b/drivers/raw/ifpga_rawdev/ifpga_rawdev.h > > index c7759b8..52fca63 100644 > > --- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.h > > +++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.h > > @@ -8,10 +8,11 @@ > > extern int ifpga_rawdev_logtype; > > > > #define IFPGA_RAWDEV_PMD_LOG(level, fmt, args...) \ > > - rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "ifgpa: " fmt, \ > > + rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "ifgpa: " fmt=20 > > +"\n", > > \ > > ##args) What about add '__func__' to macro ' IFPGA_RAWDEV_PMD_LOG'? #define IFPGA_RAWDEV_PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "%s(): " fmt "\n", \ __func__, ##args) > > -#define IFPGA_RAWDEV_PMD_FUNC_TRACE() > IFPGA_RAWDEV_PMD_LOG(DEBUG, > > ">>") > > +#define IFPGA_RAWDEV_PMD_FUNC_TRACE() \ > > + IFPGA_RAWDEV_PMD_LOG(DEBUG, "%s()", __func__) > > > > #define IFPGA_RAWDEV_PMD_DEBUG(fmt, args...) \ > > IFPGA_RAWDEV_PMD_LOG(DEBUG, fmt, ## args) > > -- > > 1.8.3.1