From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0069.outbound.protection.outlook.com [104.47.34.69]) by dpdk.org (Postfix) with ESMTP id 072A11B1C2 for ; Thu, 28 Sep 2017 13:23:37 +0200 (CEST) Received: from BN6PR03CA0056.namprd03.prod.outlook.com (10.173.137.18) 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 11:23:35 +0000 Received: from BY2FFO11FD038.protection.gbl (2a01:111:f400:7c0c::135) by BN6PR03CA0056.outlook.office365.com (2603:10b6:404:4c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Thu, 28 Sep 2017 11:23:35 +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 BY2FFO11FD038.mail.protection.outlook.com (10.1.14.223) 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:34 +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 v8SBMpFs016035; Thu, 28 Sep 2017 04:23:32 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:22 +0530 Message-ID: <20170928113344.12248-19-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: 131510714149007733; (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)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(50226002)(104016004)(8936002)(8676002)(81166006)(81156014)(97736004)(8656003)(68736007)(48376002)(4326008)(77096006)(356003)(305945005)(50466002)(2906002)(6666003)(86362001)(85426001)(36756003)(76176999)(50986999)(2950100002)(5660300001)(6916009)(53936002)(54906003)(106466001)(2351001)(47776003)(1076002)(33646002)(105606002)(316002)(189998001)(16586007)(498600001)(5003940100001); 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; BY2FFO11FD038; 1:3bW5rGdMjzjcefQNtEYM5L9ZHZ7ayPpPfCHGWbiJPqG7AV0/xqKsbGeJXQ4RQTwk/wZyF69CQHlEVapywTfZsSpyE0rVRTvMDZczJoLcE8LPfScQxV+ZJ/yOi6rQUzgu MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb232a31-8a4e-4951-1014-08d506635b77 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2698; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 3:1mwUaezvBy7OiogHXZFQrB8ILkYoQggc76ZfszCbqt+dAY/JkofswvO6Mtc2kp6i+jGdOH1j7pNZ/C0KAtueDzW0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VUqZezK6A0+tL1V9I1pWpDQptE0pA00QxQIkFmWsqvJ0EwqfVGZWDwsd0hy3/DhMxE3xiC3VzHHuJx7tjkkV7wHhN1p7ul66+q1t67BYhvEcitF6SVtgFuXIBPCeIpV2+7NCdoV60KjU9s= 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)(201703131448075)(201703161259150)(201703151042153)(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:+ZJOslpAXTHvzppkq/rZbMlu6UbbRdFm5U/fb0Rv/?= =?us-ascii?Q?HlsY9Ru6s7oeUq5aYrIqa60KyaOcEVEjAfhfwB8cxf3i8yzjx/QlfXqaGOiX?= =?us-ascii?Q?yuSPy/N1cB9etRzp8KI+G8pX88i2u5TBWQo7/mlnqSb+u3ofRC0KTYMJsyOo?= =?us-ascii?Q?brl2makMb60uNeByEuDPR3A7ptrVeROpS2t1UIIA/qIZlEQDw49ARyT64eo9?= =?us-ascii?Q?qzAmVXGOqpMVa5gHQ7Bhq4QDXgAlR2KFc+tI5JbyhXjsy9g4/qhYkdTy5vz5?= =?us-ascii?Q?L0L8Vb4LAP18tRH/Rt2KMLAU5Zuq8fSvzHf+4/RPcumeb/ACZtXCrIVMf7fL?= =?us-ascii?Q?uNxR5KvuiWm04BwBIShOTF1gH7fmztCtgGy5AGuKXZPDZZKowvoggRf/oWfd?= =?us-ascii?Q?O1QZZ/Upp1SZ8DLduWjfOEzq7lPWpGkDgCaG3bdr5UYcz1UiMaKDD/i8H9Fb?= =?us-ascii?Q?/YRYhmPswq0nDsckcLm7+KIQqoAwW+/a1aoToOXyOQvTsz6poF6eWP6pe1uP?= =?us-ascii?Q?fXogKoD2eRphURJIZKrkmiZF+HqdmhhvOa4dLrwWqBxo4WdoK3YkZXxS3XtP?= =?us-ascii?Q?0wnBN85WN3lQBaShaMRNOADcQmEtztlAqpOQUuU4DREHI/zu4gb+kVcsDdTN?= =?us-ascii?Q?2Xo0nj3Vu+H2eP54kRR4WhZSJQb0ci5BXRS1Ke7IjcLEAW+FSE6kblg/glVA?= =?us-ascii?Q?wRBDF4+f938tOzoAxKsi2gOGRRTwRakYZBX92quUjK+VhGuskZEqGTQLFDvw?= =?us-ascii?Q?w9+vu2+sPqO2lzV7uskzADW28OKTGIwRklDf7gICK+E9JjuC0hGDZv06rpF+?= =?us-ascii?Q?C4sQWkMgo42QV+A+nTnI4BEWuuj79b7XzJbtof0BizZTYlUk0rk3bNHIBea+?= =?us-ascii?Q?gknFFrropgfw6v5hoZGmMLcL7p+CXBj7K/Km100QBZwdUS/BAe0WbFBeI1DS?= =?us-ascii?Q?5TefuLa71O1sft43NIjJ+rINW81L0eYxMrYHWzqeV7SmcWaFh7uExMjIRa8t?= =?us-ascii?Q?gUWfG1UF5A/EEY0BuGDWoefGlTN7TUo15osAUyA+pT0qWj7grh14nr1TgMeF?= =?us-ascii?Q?5pzI+FPN/9Y/cxPp+bnvW7QmAM7dLxfVLKh9AQfk0hXY1kbV7wb3lXzBdxH8?= =?us-ascii?Q?xOU8yFfRy4nW7a90AzMyhg1LrCDvkph94AIat9miJFYSQkyZsZa9OtDw5Drz?= =?us-ascii?Q?EucToggc3/vXGE=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 6:jWSo6tzUyDlIlM0Z5qUdJCAJ9OJHmOZYAEiwFoQUrRP+fIKwaAgl/yz9lZJHXygEHIt/Hk99zX3wLcqq9Vgt5/z9mXnhxBfyMMd7tKVHrtk6XmdirCdeEMQVyq1pJ15F7lsw9FRs76TkQsDhAIsrUujHMBFoyZQFXCX6hCum1jXjjUq4DpOVb2G5ceSzDuK+bJSp0YQqFMH2n5W0jSXMFDz7XZuqPdQeyNIJQ3VbpkXkEQQPcm5uEaxSTQ8WzYrgpUwBXu1r8nccyMCcmwzFl5DRpMeljckX0afvy2hUtyxi5C1ZgB3vnPwfiYhhyPqXczQNpM4+XgOLsQ8EiGcNpg==; 5:8IlhH0G2CMSkgPGcGLu3sAReX9opiLrmJHv2wtOFJRFEr15JWBRiZHzkT2Y09rK0CVqFSfMCX4aHQecHD54L05wC9E84ntELLI8v9wFfls6lgSvFG5awQ3N2vr2sgBwNVtgEL6Dg9P099IBvXYEjPQ==; 24:HmWMOpPdO6vcUkiTpQT2fPqYbx4j2ykgR7JUBk3zdeWt/hLio/2qulCX1cUv0yiHJN0qI4peyUgO39jBJYJA6+jh2E+UeKdURLacTDKvgyo=; 7:iC+3DlCjWp4HlNITk5K5lqqN+NNY5f7wN+/4suyxakON/0k8KQRdtOXBQkIAIYeQ2i4UybKnh/Dd06xOiid72jy+UHKVymHf7MYBKMnFMBmtCvdYs3HaQB5yjoQigar0NUHbXyPVXJfJowSgCQKLAgijWEzyajshR08gxa8Pk0BIR11FcSr+GnIsHLvYmRpMpfcHx4cLl4Bc2hzfWmy1imJMRAthG2BVLwt7ZajhQmA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 11:23:34.6979 (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 v5 18/40] bus/dpaa: add DPAA mempool 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:37 -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 | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 8017df3..dc2b3ad 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -70,6 +70,7 @@ #include int dpaa_logtype_bus; +int dpaa_logtype_mempool; struct rte_dpaa_bus rte_dpaa_bus; struct netcfg_info *dpaa_netcfg; @@ -452,4 +453,8 @@ dpaa_init_log(void) dpaa_logtype_bus = rte_log_register("bus.dpaa"); if (dpaa_logtype_bus >= 0) rte_log_set_level(dpaa_logtype_bus, RTE_LOG_NOTICE); + + dpaa_logtype_mempool = rte_log_register("mempool.dpaa"); + if (dpaa_logtype_mempool >= 0) + rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE); } diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index 853bc47..a2394b8 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -8,6 +8,7 @@ DPDK_17.11 { bman_new_pool; bman_query_free_buffers; bman_release; + dpaa_logtype_mempool; 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 cc10937..5335fd8 100644 --- a/drivers/bus/dpaa/rte_dpaa_logs.h +++ b/drivers/bus/dpaa/rte_dpaa_logs.h @@ -36,6 +36,7 @@ #include extern int dpaa_logtype_bus; +extern int dpaa_logtype_mempool; #define DPAA_BUS_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \ @@ -62,4 +63,23 @@ extern int dpaa_logtype_bus; #define DPAA_BUS_WARN(fmt, args...) \ DPAA_BUS_LOG(WARNING, fmt, ## args) +/* Mempool related logs */ + +#define DPAA_MEMPOOL_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \ + __func__, ##args) + +#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>") + +#define DPAA_MEMPOOL_DPDEBUG(fmt, args...) \ + RTE_LOG_DP(DEBUG, PMD, fmt, ## args) +#define DPAA_MEMPOOL_DEBUG(fmt, args...) \ + DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args) +#define DPAA_MEMPOOL_ERR(fmt, args...) \ + DPAA_MEMPOOL_LOG(ERR, fmt, ## args) +#define DPAA_MEMPOOL_INFO(fmt, args...) \ + DPAA_MEMPOOL_LOG(INFO, fmt, ## args) +#define DPAA_MEMPOOL_WARN(fmt, args...) \ + DPAA_MEMPOOL_LOG(WARNING, fmt, ## args) + #endif /* _DPAA_LOGS_H_ */ -- 2.9.3