From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0085.outbound.protection.outlook.com [104.47.38.85]) by dpdk.org (Postfix) with ESMTP id 5DE9D1B1FD for ; Thu, 28 Sep 2017 14:19:51 +0200 (CEST) Received: from BN6PR03CA0095.namprd03.prod.outlook.com (10.164.122.161) by DM5PR03MB2698.namprd03.prod.outlook.com (10.168.197.136) 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 12:19:50 +0000 Received: from BY2FFO11OLC004.protection.gbl (2a01:111:f400:7c0c::192) by BN6PR03CA0095.outlook.office365.com (2603:10b6:405:6f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 12:19:49 +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 BY2FFO11OLC004.mail.protection.outlook.com (10.1.15.184) 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 12:19:49 +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 v8SCJ72E008785; Thu, 28 Sep 2017 05:19:47 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:59:41 +0530 Message-ID: <20170928123000.1711-22-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928123000.1711-1-shreyansh.jain@nxp.com> References: <20170928113344.12248-1-shreyansh.jain@nxp.com> <20170928123000.1711-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510747899865182; (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)(376002)(39860400002)(346002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(105606002)(1076002)(33646002)(189998001)(316002)(53936002)(54906003)(47776003)(106466001)(2351001)(5003940100001)(16586007)(498600001)(97736004)(81156014)(305945005)(356003)(50466002)(68736007)(8656003)(48376002)(4326008)(77096006)(50226002)(104016004)(8676002)(81166006)(8936002)(76176999)(6916009)(5660300001)(2950100002)(50986999)(2906002)(86362001)(36756003)(85426001)(6666003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2698; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC004; 1:6ZreWe5b+rAFDGiGnrW4jnYaL0UXhx9I8V1groEpgifcxPNjAbZco/XjHkYEZrZ7n0ayKYmffCtrdTuFLxzlAUaSrcPhedDR0D/mi+Gz65Sr8IEiCWjkRdOMHyb4ERcM MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6afafbac-3fe7-4fee-a85e-08d5066b372e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2698; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 3:7ZH77iRZPH8rkpj/vMNo5REOJDVtD/pIKp+fpeS6VQ5MAH5cHkzcbqzOeFFOrIMQV4kWguJP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fpkNtGx8XMbEOucZsXvMLE1WGs5E8kARE9IUQ0lUfZ/46SFRUs4oTeTVJnPPtrNyYhtgUJucWK3iiFH5QQzaFSiZUBBksb9Fkv/+wG1HlADo4s+rWf0Wj/CKbnTUzv7i+Fk/5kYcWVBxuIkXvDWdJW/Q00EiNin1k= 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)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123565025)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123563025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2698; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2698; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2698; 23:RCVF9lMo5jY4eWycpyBW+U0xQlC1khy4Fcd7GU1XJ?= =?us-ascii?Q?9MTYui1meJezt9FrNy18YufhasKIWsts3lGiV5HGZKjpjLzzUYPDxaRaSIoK?= =?us-ascii?Q?MmmI+WbKSa33uu8SWp9JnEQQwl/KDVyc7+2oKyyGHSaQpEmFBF6Tc0jYmyc6?= =?us-ascii?Q?cRcn1QHfTj/GEydXTuvaXa4MREIk1yqKWIolPt+N/k27M/j8Qco66Ni16DE7?= =?us-ascii?Q?CtidBIuBtxcz4S3BV7D3wJFDqqZ/NWJksF/jRArXH8CM2EkvaT1s7jFu18b2?= =?us-ascii?Q?ex1KfbHs7l6od95UdmEjmXJnePsZyGOP10/gs2ozpT3SmEOylpEGHzbCfD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ZXkimIWf0a5XVTKb1FxFuRA24HA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 6:q4HtpGVdszxxlsI3RIQW/IvxrW/2EcHn8OduXieVxNu03Lhh0G63vU0SRcWLdtMzYLtZTtNsmxoB3bBci9ObZbfZM2cledLq6KNqxQ4QSlUH/zh2eub2X7J8jUiIA6nK8cp819BrHjUQqdQ8haZ9dIVdjd4QLgff+QU9excFciOROK4mv3sdf3vKP2WWrKzklBmzBC8r9zwvLZojL0n+bBJQS+zrBo/vQWkjov9fi5tLkp66OQvDD9M0JmeRg58wGVPsdDB1NsekMuHtrGp9Mj+l1nWODGJSJXCy2QKh24VEs9QpRRrUSggrJiDXhaxog7ZqzorXpnjKxZZDW2YBZA==; 5:svI71SiqM+9eN7qB/W1whvhvnTLLztUSf4hX4/GPfS1EnOPXs0zd8cWkA1knDtD5L74ivtVgU0J1fKSdt13tN/ZUajHwtnYfs69KvsA3F0cQcuiCuNAHqD52vG0m0ISjyu6/KMEqzhQfVndytYOsNw==; 24:m1v/6jAQtCGtwgGdM3zCfksBuxdL1CThvj77OcTdMBoOwOyZY5B82bKp5HzCf3zatQzpl670SHTnxYZ+zKJsAoyEWY+lIScK9FfMTNTdoBM=; 7:zmLC9OC7yIaNiJL4gP5PlcFCalHscBnnf1mV6iTdjvq96UQnDlxmZH/pU/ekpoN9tqG33bW+L0c0JhIMjHY5dOD5rvdR3cj77Bz2am/OpAQQjCs3ek3Ldt3PllvyNJPl80G4woykeHPR+tK0QlZaYdc7EeftA0S3ocLG9aiJ8Ef38kFVpjL2XPthCTiy+pw6ycNd5Kr5YtDXUVqfKQ45GKyG6de4zHR9W54uaBrvd+0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 12:19:49.7993 (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: DM5PR03MB2698 Subject: [dpdk-dev] [PATCH v6 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 12:19:52 -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