From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 835B511A4; Tue, 19 Mar 2019 08:56:29 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 00:56:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,497,1544515200"; d="scan'208";a="143216253" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 19 Mar 2019 00:56:28 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 00:56:28 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 00:56:27 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.26]) with mapi id 14.03.0415.000; Tue, 19 Mar 2019 15:56:25 +0800 From: "Pei, Andy" To: "Xu, Rosen" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] raw/ifpga: modify log output. Thread-Index: AQHU2kuRbb85JvzXKEKAdgeQpJbwdaYSTOowgABQb3A= Date: Tue, 19 Mar 2019 07:56:25 +0000 Message-ID: <5941F446C088714A85408FA3132CFCBB658D49@SHSMSX101.ccr.corp.intel.com> References: <1552556863-35966-1-git-send-email-andy.pei@intel.com> <0E78D399C70DA940A335608C6ED296D73A613AE2@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0E78D399C70DA940A335608C6ED296D73A613AE2@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="us-ascii" 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: , X-List-Received-Date: Tue, 19 Mar 2019 07:56:30 -0000 Hi, Rosen: Yes. Original code just print "ifpga:>>". After the patch, function name will be printed out ,like "ifpga:XXXX()", an= d every log info will goes in a new line. -----Original Message----- From: Xu, Rosen=20 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. Hi, 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 > -----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. >=20 > print function name in IFPGA_RAWDEV_PMD_FUNC_TRACE. > The original code just print ">>", no other useful infomation is printed. > A new line goes after every IFPGA log. >=20 > Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver") > Cc: rosen.xu@intel.com > Cc: andy.pei@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Andy Pei > --- > drivers/raw/ifpga_rawdev/ifpga_rawdev.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > 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; >=20 > #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) >=20 > -#define IFPGA_RAWDEV_PMD_FUNC_TRACE() IFPGA_RAWDEV_PMD_LOG(DEBUG,=20 > ">>") > +#define IFPGA_RAWDEV_PMD_FUNC_TRACE() \ > + IFPGA_RAWDEV_PMD_LOG(DEBUG, "%s()", __func__) >=20 > #define IFPGA_RAWDEV_PMD_DEBUG(fmt, args...) \ > IFPGA_RAWDEV_PMD_LOG(DEBUG, fmt, ## args) > -- > 1.8.3.1 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 A246FA05FE for ; Tue, 19 Mar 2019 08:56:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B35EC2BAF; Tue, 19 Mar 2019 08:56:31 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 835B511A4; Tue, 19 Mar 2019 08:56:29 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 00:56:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,497,1544515200"; d="scan'208";a="143216253" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 19 Mar 2019 00:56:28 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 00:56:28 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 00:56:27 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.26]) with mapi id 14.03.0415.000; Tue, 19 Mar 2019 15:56:25 +0800 From: "Pei, Andy" To: "Xu, Rosen" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] raw/ifpga: modify log output. Thread-Index: AQHU2kuRbb85JvzXKEKAdgeQpJbwdaYSTOowgABQb3A= Date: Tue, 19 Mar 2019 07:56:25 +0000 Message-ID: <5941F446C088714A85408FA3132CFCBB658D49@SHSMSX101.ccr.corp.intel.com> References: <1552556863-35966-1-git-send-email-andy.pei@intel.com> <0E78D399C70DA940A335608C6ED296D73A613AE2@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0E78D399C70DA940A335608C6ED296D73A613AE2@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: <20190319075625.EMa9T6QCSTEvzMq5miuzCaf5odTyVJThWaLjYq4O30I@z> Hi, Rosen: Yes. Original code just print "ifpga:>>". After the patch, function name will be printed out ,like "ifpga:XXXX()", an= d every log info will goes in a new line. -----Original Message----- From: Xu, Rosen=20 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. Hi, 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 > -----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. >=20 > print function name in IFPGA_RAWDEV_PMD_FUNC_TRACE. > The original code just print ">>", no other useful infomation is printed. > A new line goes after every IFPGA log. >=20 > Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver") > Cc: rosen.xu@intel.com > Cc: andy.pei@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Andy Pei > --- > drivers/raw/ifpga_rawdev/ifpga_rawdev.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > 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; >=20 > #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) >=20 > -#define IFPGA_RAWDEV_PMD_FUNC_TRACE() IFPGA_RAWDEV_PMD_LOG(DEBUG,=20 > ">>") > +#define IFPGA_RAWDEV_PMD_FUNC_TRACE() \ > + IFPGA_RAWDEV_PMD_LOG(DEBUG, "%s()", __func__) >=20 > #define IFPGA_RAWDEV_PMD_DEBUG(fmt, args...) \ > IFPGA_RAWDEV_PMD_LOG(DEBUG, fmt, ## args) > -- > 1.8.3.1