From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0069.outbound.protection.outlook.com [104.47.40.69]) by dpdk.org (Postfix) with ESMTP id BEB34DE3 for ; Wed, 11 Oct 2017 08:42:27 +0200 (CEST) Received: from CY1PR03CA0036.namprd03.prod.outlook.com (10.174.128.46) by CO2PR03MB2360.namprd03.prod.outlook.com (10.166.93.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 06:42:26 +0000 Received: from BL2FFO11FD032.protection.gbl (2a01:111:f400:7c09::118) by CY1PR03CA0036.outlook.office365.com (2603:10b6:600::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Wed, 11 Oct 2017 06:42:25 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD032.mail.protection.outlook.com (10.173.160.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Wed, 11 Oct 2017 06:42:25 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9B6gG34030306; Tue, 10 Oct 2017 23:42:17 -0700 To: Jianfeng Tan CC: , , , , , , , , , References: <1507519229-80692-1-git-send-email-jianfeng.tan@intel.com> <1507548444-33959-1-git-send-email-jianfeng.tan@intel.com> <1507548444-33959-4-git-send-email-jianfeng.tan@intel.com> From: Shreyansh Jain Message-ID: <7732f195-64fd-308c-8faf-c1b0e37d3453@nxp.com> Date: Wed, 11 Oct 2017 12:24:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507548444-33959-4-git-send-email-jianfeng.tan@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521777453926889; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(376002)(346002)(39860400002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(377454003)(199003)(189002)(24454002)(6916009)(31696002)(64126003)(305945005)(31686004)(2906002)(58126008)(104016004)(53936002)(498600001)(33646002)(36756003)(54356999)(8676002)(7416002)(76176999)(356003)(5660300001)(2950100002)(105606002)(8936002)(189998001)(81156014)(81166006)(106466001)(4326008)(50986999)(68736007)(23676002)(85426001)(316002)(83506001)(65826007)(6246003)(65806001)(65956001)(97736004)(230700001)(50466002)(39060400002)(69596002)(86362001)(77096006)(47776003)(6666003)(229853002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2360; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD032; 1:9BEPcYPpcCpmBb8N8oTuOBLNah/Jjh7nUsXl9EFbIhorim9xE2Ktmkl33zNxG375ZeMvBs57FFaikGHQQu8kBwrsgpPneoE4dZXW1Z1NKFUatMYPwnzyvj0HFRL+j5Yj X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa1137ee-557c-4e66-89e9-08d510733bd5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CO2PR03MB2360; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2360; 3:KlYVsYMJKba+YDkLcTISHHZGQaij7wcq4fZZpr2ve8YEB+i+OjII8W8LzOcxZk81CvIxVR6GHkoluig7AMtvOdkNJWUBjIHFdUf+sgiy3n36VCGE2Grcbm7DS8kpNvHGUw2wCiEOWkg/pjiW+KUQI7lotdLvwPuQ+WvYqxqoQFGLFlN7WOefpE2V1WJWcupPzvRVrYAziOJvfmUeL1FnU8U4dv3JWVVRAHs5liHFj/oh4nAiMlyPGeL96c3MRox62g44CgfRBG7rISE12vzEWgcv976c3zK9zQAKewvYEKZekqDWTdgBHGoRQJ5nhVara0cZn6oei2ORmeHBKUhFv4adRygJh6URvoGCcd/U/HU=; 25:jLAo1Iy2B1XeM6jQOIO7+O0V8Gz1EBV0ap8V7adwNUWtCScHhrWDTwbvc68P89SWVcz0YjtYYjFo6VxixSCAysr1dkJ+45MLlu3MRbgtx8X0vyoTXqIFok1oV4I6Ru+qGHriwWaahZphecKjkiUuBrTDkiZT2Xip2IaR1NP3ULghUiQKwGXahMjsf5QaDC3YaQWEXDdw1luHGoAEM1pqszyOOi01uCQ4Q8+hmKCYMReYjKSs3jGvGEO9yn7KMqdyn5yncPWCk/BLDaXiqEehkQZcr9b+1Z5eskZ5zgTRAKWhU5q0paVJIiKB89Lf9j34hmVO+l5EURTTNcLloBDCVg== X-MS-TrafficTypeDiagnostic: CO2PR03MB2360: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2360; 31:C3VJUWy8klsJ37EA4gYmixaW9rJOnF7ukRaujv42Kk3jldL9pRi8PanvMFAbU8WQZYGrU0vy6JNdxkxNEKdbOIS3u99GWBefaGfMPM1t+IuKKe0oeEl4z6UhEjWHomfMctoiK4uM12kbC+CTiHFP8ry9rhlA+AQQA5aFnqzXFrPrmfn5Dqm9BLsIcYDpdR+2t8EcSH566/xR3/mgw2q1ZXNs4V2QpytVqmWmnm6wNuw=; 4:B6VB6AQET2iHDH31qeMUCOHXiWB5KmC1BDl7Uqehqhb21nvpcutFZVZ/EBS1m+L4/emWDjVUw5uiS1gXmJbYVQGLtSycGsRmSF6jGhPqzT6aUYHBtk+G2jEkAToyF9PAN+Ls0a/yVQ9VDGI0+1xUkl++Rq8mGbjnyTU4dGMnqpo6nY5cqMztjodmqvF9xaDHuxOCbEBXFOiGYKeIXy7XrUk6NodscNfKj38H8KrAZ+T7MhRCOiVCGuEioLcFL9uX9uI+IW/d/fgwZhhGvqd5QtkoV2oOu85K12OuyRvl3oM= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2360; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2360; X-Forefront-PRVS: 0457F11EAF X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzJQUjAzTUIyMzYwOzIzOjdzTDgraEZ0S1lxUnpFK2hMeWlRbjJ4ZS9m?= =?utf-8?B?NFV3ZWhUc3dtNXlaVnkwdCttNWNhMEdXY1hWTUVPQ1hkbHF5b3NteitSNWlQ?= =?utf-8?B?UXoxaFpseG1kaXpwVjhCdVNkQkpqS2hORHVMSTZZdG5aZFZ5NTZhUkROZVJM?= =?utf-8?B?NHV1MnUvZ1duK2VSdGthQVM3blVM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360; 6:e+0UHkz8QQK/Uvmy8URB0uKkZduOprornPd6aZ9suXOrkhiRMJrrF1kK1Fch17KhWtan9nvsHp+Gb5JfwgskKgymOqTUvDRMWviasIbpNdBIKIRIfMZrO+bNV/5LCjQtOtCsoPJ5suvZ97yWuuwF5fQG48lEme5M9ZDAzzEVhI9rAbj9zZC+rawcwgZf7cSA+Wm+uwv+rRs8yuTVHAPmEXNwju79Pi8dbktn4O3/ZIhycDISyn2JG5u8qohzCVDY87yW4auopaAxBGlZ//45HwkVR+7lgoqJOEg7r0zzixvzEpFDac1DMx3OqmHf8BNt4HajQWTRXAv57aJ3PXs9FQ==; 5:FbTxJRhCSQ4P8ad8PdgtOLCcVGgB6ygo0/E5TC97DKBkYydsqXqHaU5unR734phlGH+qrVnO9zWzxPKXGM64s1Ik7KV4KMAzV9zHl9sRlHDMPQkD2fbd1/M3OloYqOtVBRFix5dUr2ls/qX/3YTym/KZYDPSGlC8D/wDUZljgBQ=; 24:il8S4kOwy1X6VqOv0f/R0s00WHJClT3r+7KIqhGQcNUYMrWy2XwPuc5/XnWdqpff70oLGjTW/zsbKc+3woeWtRQX1LaIk0X8m27IW3O0KyQ=; 7:UaE/1abAz43SyxuUxhAgyVqwddug9WMGrvF7G5l51J4ialwGscJl55qBrctfVwuhUKbdMO2QS7RcSikbb1wqfCwNHY5OREMFBF/zEMYNn2zLxpzSXQ29gbt2w3jgY3QC+l761Zvq8v88VqTeEqHzSHJ/WDk8MxxYrdIBKavmoQLPcjLGyxkPkPRzGWXtpa2w+QRwKb3a9Gy2PHNUKMyJJ3Eo7ujskYGnlObBmkZv+xU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 06:42:25.1118 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2360 Subject: Re: [dpdk-dev] [PATCH v5 3/5] bus: introduce new log type for bus drivers 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: Wed, 11 Oct 2017 06:42:28 -0000 Hello Jianfeng, On Monday 09 October 2017 04:57 PM, Jianfeng Tan wrote: > Introduce a new log type, RTE_LOGTYPE_BUS, for bus drivers. And > change fslmc to use this type for logging. > > Suggested-by: Gaetan Rivet > Signed-off-by: Jianfeng Tan > --- > drivers/bus/fslmc/fslmc_bus.c | 9 +++---- > drivers/bus/fslmc/fslmc_logs.h | 42 ++++----------------------------- > drivers/bus/fslmc/fslmc_vfio.c | 4 +--- > lib/librte_eal/common/eal_common_log.c | 1 + > lib/librte_eal/common/include/rte_log.h | 1 + > 5 files changed, 11 insertions(+), 46 deletions(-) > > diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c > index 0a8229f..236ec3a 100644 > --- a/drivers/bus/fslmc/fslmc_bus.c > +++ b/drivers/bus/fslmc/fslmc_bus.c > @@ -34,7 +34,6 @@ > #include > #include > > -#include > #include > #include > #include > @@ -42,11 +41,9 @@ > #include > #include > > -#include > -#include > - > -#define FSLMC_BUS_LOG(level, fmt, args...) \ > - RTE_LOG(level, EAL, fmt "\n", ##args) > +#include "rte_fslmc.h" > +#include "fslmc_vfio.h" > +#include "fslmc_logs.h" > > #define VFIO_IOMMU_GROUP_PATH "/sys/kernel/iommu_groups" > > diff --git a/drivers/bus/fslmc/fslmc_logs.h b/drivers/bus/fslmc/fslmc_logs.h > index 1f7c24b..dbf2281 100644 > --- a/drivers/bus/fslmc/fslmc_logs.h > +++ b/drivers/bus/fslmc/fslmc_logs.h > @@ -33,44 +33,12 @@ > #ifndef _FSLMC_LOGS_H_ > #define _FSLMC_LOGS_H_ > > -#define PMD_INIT_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) > +#include > > -#ifdef RTE_LIBRTE_DPAA2_DEBUG_INIT > -#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") > -#else > -#define PMD_INIT_FUNC_TRACE() do { } while (0) > -#endif > +#define FSLMC_BUS_LOG(level, fmt, args...) \ > + RTE_LOG(level, BUS, "%s(): " fmt "\n", __func__, ##args) > > -#ifdef RTE_LIBRTE_DPAA2_DEBUG_RX > -#define PMD_RX_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > -#else > -#define PMD_RX_LOG(level, fmt, args...) do { } while (0) > -#endif > - > -#ifdef RTE_LIBRTE_DPAA2_DEBUG_TX > -#define PMD_TX_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > -#else > -#define PMD_TX_LOG(level, fmt, args...) do { } while (0) > -#endif > - > -#ifdef RTE_LIBRTE_DPAA2_DEBUG_TX_FREE > -#define PMD_TX_FREE_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > -#else > -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) > -#endif > - > -#ifdef RTE_LIBRTE_DPAA2_DEBUG_DRIVER > -#define PMD_DRV_LOG_RAW(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) > -#else > -#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) > -#endif > - > -#define PMD_DRV_LOG(level, fmt, args...) \ > - PMD_DRV_LOG_RAW(level, fmt "\n", ## args) > +#define FSLMC_VFIO_LOG(level, fmt, args...) \ > + RTE_LOG(level, EAL, "%s(): " fmt "\n", __func__, ##args) This change breaks the FSLMC bus driver. There are macros like PMD_DRV_LOG which are still in use in the code. Before removing the above, those would have to be restructured. I am already working on converting this logging into dynamic logging. Can you skip this work until then? Does it block your work? > > #endif /* _FSLMC_LOGS_H_ */