From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0063.outbound.protection.outlook.com [104.47.38.63]) by dpdk.org (Postfix) with ESMTP id 0625A1B1FA for ; Thu, 28 Sep 2017 13:23:43 +0200 (CEST) Received: from BN3PR03CA0105.namprd03.prod.outlook.com (2603:10b6:400:4::23) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 11:23:42 +0000 Received: from BY2FFO11FD033.protection.gbl (2a01:111:f400:7c0c::134) by BN3PR03CA0105.outlook.office365.com (2603:10b6:400:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Thu, 28 Sep 2017 11:23:42 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD033.mail.protection.outlook.com (10.1.14.218) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 11:23:42 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8SBMpFv016035; Thu, 28 Sep 2017 04:23:40 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:25 +0530 Message-ID: <20170928113344.12248-22-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928113344.12248-1-shreyansh.jain@nxp.com> References: <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170928113344.12248-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510714223206509; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(33646002)(5003940100001)(2950100002)(104016004)(189998001)(68736007)(6666003)(2906002)(106466001)(8656003)(498600001)(86362001)(47776003)(105606002)(50466002)(50986999)(4326008)(76176999)(48376002)(16586007)(77096006)(6916009)(8676002)(36756003)(305945005)(81156014)(81166006)(2351001)(316002)(54906003)(97736004)(50226002)(53936002)(5660300001)(8936002)(85426001)(356003)(1076002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD033; 1:Y+Yy42E93WZ4hCZ0+z3fuKA4heF4lShREslcaiyJJjyzbRdloGZCVR8QJ9K95ApC+qLaYg1v/BlgjXZ1GGjm5SJqqinIIhtx3mFRE3fjYx2SoqrXClguFIowap42UZIz MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4122e00a-23e9-40e0-a06d-08d506635fe5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:JV/J2xMeR5FJv3V9Qy+nTpUpjQv2PqhGtyahXagOrx1qxI9b0V1cC9FGRlYoOp/aGa2aW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mMdm8+Qr9gXrD/RX8mjRAd/gCIvRn9gWqVw0rtUiTvrqvNH9M2bnIA7/1stXr7DpJOEZm3/piR3JQsyYILXMXhEd250vtXFJu44kQRp8auzkStITdGi6TBA96h3+Tc7ExwLfKO5OnSQ+JIz/lXhfsjm9FjHpyL0UaIOi0LY6g/IOCUXsrUQY= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); 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)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2365; 23:jgt4nDf0wasiKAnQuevgqclRBcpIHLb/JQcMmMZNo?= =?us-ascii?Q?KBcQ8d+7Jz+oQ7Kebl+BofsuCcp7x7+4gpIukAodPxF9QfnW37p4SXzYJX1d?= =?us-ascii?Q?aK1RSsqvAJj1IOKMfPfa9x1pHRTCh7QPuM9ELFKoqsXdE/I5TEme3geE65y0?= =?us-ascii?Q?sONzix9rS68nXe4byiYFNJ7zkyX5aOEE10VfbXO2ywfKTOnAg0DmowHhgORz?= =?us-ascii?Q?5FFskvXTzPIrCa63ccPOpZeKyzvuasjthTAn6jZwxMDsqSeYcsOIEYIYuFIO?= =?us-ascii?Q?CrCdV8iebIrc1791wHey1Gok0hyS606My3VWT+zE9gVy0tlH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ncOb5hca2InMxKOjj9cKs1ChazDQ3FYvw/VipuUw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 6:5gJEWkeShOeoAC196A6Pb3Bf4JC1cK2cVE8eZ92ENP4ulxiJSmJQ0z/y1CidfIJdfWUbg6t9UXj+vqzO1NAM8vd4MBEeQOze1mLl2dY/Un6CoaTSKF65IzU3FKkJ8nKszAwKEDFcO93kcso2oY1UVEyFGq4HuFzJcgwSn2E09w1XCak/UAyycMTGR1MGzorMumWNYbmk6teQwEThQQMyFTj8mMkQhJ6/7TrxA+I30m3bi56QfCU4A2dTp1m0n2a36yCzuP4918RV1CsS/vWx96Yco+UDVOlT7A3m00X2VTBorgZazr+x3SW1dXc99TAcQpCkzic/e9Jesi0Pgd3z3A==; 5:OFTm4hh9FJvga3DYCQ2nBLqsUyIzstcAAT/Gr1YYzAlgQeCiky0PjOqw2XcVVQpQBMDj09gyX4OyVEK4+Stt8mQ5i3G2FUipNZ0vfn3PP2H5HEx9KJ07/owomDkh7W6aj/Y0gkJ4DAJ9ElqPn5W3lg==; 24:pJT4fubMLcuHAAXupDIg9pvoY+wMVKPbL2Zl4fLFFG6ChiZ49Nynhd0acYwL/m2OKo23Oy7LfCmC6gNV/RH/Vb0PiTZTL0tleUH+qf4X1do=; 7:lG4NK7rWFuwkDgYx97Obr72cvfMe6TT5+1yQlyE9ifui9hWGQxeepH6EL9eX218va/1ogtQ/hpcgm2L1CZY2Gb1TF7lE4Gt7J/OY64gEdHIXE/CgLa39J5GhyBr3KSSUuREXczoBRs3TJpO+3v2gD55HSy1UQFncWaPdVLERe00dJAkYKF0KVzAkLH1aS7EdLjpDPADDc+rBDK9KfhcqsaAtz81+YSCFCc8T4/nGXmc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 11:23:42.1334 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2365 Subject: [dpdk-dev] [PATCH v5 21/40] bus/dpaa: add DPAA PMD logging macros 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: Thu, 28 Sep 2017 11:23:44 -0000 Signed-off-by: Shreyansh Jain --- drivers/bus/dpaa/dpaa_bus.c | 5 +++++ drivers/bus/dpaa/rte_bus_dpaa_version.map | 1 + drivers/bus/dpaa/rte_dpaa_logs.h | 22 ++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index dc2b3ad..7ae5bfa 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -71,6 +71,7 @@ int dpaa_logtype_bus; int dpaa_logtype_mempool; +int dpaa_logtype_pmd; struct rte_dpaa_bus rte_dpaa_bus; struct netcfg_info *dpaa_netcfg; @@ -457,4 +458,8 @@ dpaa_init_log(void) dpaa_logtype_mempool = rte_log_register("mempool.dpaa"); if (dpaa_logtype_mempool >= 0) rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE); + + dpaa_logtype_pmd = rte_log_register("pmd.dpaa"); + if (dpaa_logtype_pmd >= 0) + rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE); } diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index a2394b8..64a05a9 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -9,6 +9,7 @@ DPDK_17.11 { bman_query_free_buffers; bman_release; dpaa_logtype_mempool; + dpaa_logtype_pmd; dpaa_netcfg; fman_ccsr_map_fd; fman_dealloc_bufs_mask_hi; diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h index 5335fd8..037c96b 100644 --- a/drivers/bus/dpaa/rte_dpaa_logs.h +++ b/drivers/bus/dpaa/rte_dpaa_logs.h @@ -37,6 +37,7 @@ extern int dpaa_logtype_bus; extern int dpaa_logtype_mempool; +extern int dpaa_logtype_pmd; #define DPAA_BUS_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \ @@ -82,4 +83,25 @@ extern int dpaa_logtype_mempool; #define DPAA_MEMPOOL_WARN(fmt, args...) \ DPAA_MEMPOOL_LOG(WARNING, fmt, ## args) +/* PMD related logs */ + +#define DPAA_PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \ + __func__, ##args) + +#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>") + +#define DPAA_PMD_DEBUG(fmt, args...) \ + DPAA_PMD_LOG(DEBUG, fmt, ## args) +#define DPAA_PMD_ERR(fmt, args...) \ + DPAA_PMD_LOG(ERR, fmt, ## args) +#define DPAA_PMD_INFO(fmt, args...) \ + DPAA_PMD_LOG(INFO, fmt, ## args) +#define DPAA_PMD_WARN(fmt, args...) \ + DPAA_PMD_LOG(WARNING, fmt, ## args) + +/* DP Logs, toggled out at compile time if level lower than current level */ +#define DPAA_DP_LOG(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) + #endif /* _DPAA_LOGS_H_ */ -- 2.9.3