From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id A03E6A00E6
	for <public@inbox.dpdk.org>; Tue, 19 Mar 2019 11:40:55 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 3492F2C30;
	Tue, 19 Mar 2019 11:40:54 +0100 (CET)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 0B4CC11A4;
 Tue, 19 Mar 2019 11:40:51 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 19 Mar 2019 03:40:50 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.58,497,1544515200"; d="scan'208";a="153049187"
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by fmsmga002.fm.intel.com with ESMTP; 19 Mar 2019 03:40:50 -0700
Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 19 Mar 2019 03:40:50 -0700
Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by
 fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 19 Mar 2019 03:40:49 -0700
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.74]) by
 SHSMSX101.ccr.corp.intel.com ([169.254.1.158]) with mapi id 14.03.0415.000;
 Tue, 19 Mar 2019 18:40:47 +0800
From: "Xu, Rosen" <rosen.xu@intel.com>
To: "Pei, Andy" <andy.pei@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "stable@dpdk.org" <stable@dpdk.org>
Thread-Topic: [PATCH] raw/ifpga: modify log output.
Thread-Index: AQHU2kuRbb85JvzXKEKAdgeQpJbwdaYSTOowgABQb3CAAC2qEA==
Date: Tue, 19 Mar 2019 10:40:46 +0000
Message-ID:
 <0E78D399C70DA940A335608C6ED296D73A615E09@SHSMSX104.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>
In-Reply-To: <5941F446C088714A85408FA3132CFCBB658D49@SHSMSX101.ccr.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjVkZGU4M2MtYmEyNy00YjJjLWFiMzQtYTY5ZmE3NmYyNmU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicWNoM3ZEY3BBOWZuMFo1VlhaNGt0M0NTXC9CMk1UMmdXamRnWHd6SGVpU2d4U1ZEZlpGYkpxdG1oblFKRGRFMnEifQ==
x-ctpclassification: CTP_NT
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190319104046.Aoez8SSwrsXjL-lFY-8Ye1C1K5C9NFJ5UBrJi_wFdbI@z>

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 <rosen.xu@intel.com>; 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 "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 <andy.pei@intel.com>; 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 <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>;
> > 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 <andy.pei@intel.com>
> > ---
> >  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 "\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