From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0044.outbound.protection.outlook.com [104.47.32.44]) by dpdk.org (Postfix) with ESMTP id A566C1B21D for ; Sat, 9 Sep 2017 13:11:10 +0200 (CEST) Received: from CY4PR03CA0079.namprd03.prod.outlook.com (10.171.242.148) by CY4PR03MB3317.namprd03.prod.outlook.com (10.171.246.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Sat, 9 Sep 2017 11:11:06 +0000 Received: from BY2FFO11FD010.protection.gbl (2a01:111:f400:7c0c::171) by CY4PR03CA0079.outlook.office365.com (2603:10b6:910:4d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Sat, 9 Sep 2017 11:11:06 +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 BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Sat, 9 Sep 2017 11:11:06 +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 v89BAUhI026326; Sat, 9 Sep 2017 04:11:04 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:09 +0530 Message-ID: <20170909112132.13936-19-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170909112132.13936-1-shreyansh.jain@nxp.com> References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131494290667910961; (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)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(53936002)(2906002)(8656003)(54906002)(50226002)(85426001)(1076002)(47776003)(68736007)(498600001)(36756003)(97736004)(5003940100001)(356003)(2950100002)(33646002)(77096006)(189998001)(105606002)(50466002)(48376002)(8676002)(81156014)(81166006)(305945005)(106466001)(8936002)(6916009)(2351001)(104016004)(86362001)(110136004)(5660300001)(76176999)(50986999)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB3317; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:a6teF4tXgSBqOeC3jx9g45wy3K03YPKJl1RxF2H2PejgusKKAe9dr3nH0wIS1o34IaG1Y2MDuEJvCSSH6gBlWl9YY15Ed46DD3Ng4A4OrjyXj4yN+DJUjtL0MrIJBE2Y MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7af6c287-b642-49e5-b731-08d4f77377b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR03MB3317; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB3317; 3:XHK70cJ9pFK/U8If4ptN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lWRud4kkI76Vg+9Xb/9GoHS8o4s+iXZmUDuXIvdaR3VLnRaRSOMCbcKqBHyFOt69HGXSS47QBkmMy7L+kSti9BKuBtc6tYe7YbTZwcHmZUYS6m6kZQ2hDzMAWOUPOn+92THP1bR8OtMRZ1OgcaIzECZxqIMdDRv3lGtHAAcRGd/DsBLSZoVN1BxjAj4YYC2h4GROuzVkFpuWijBHZWNIZY= 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)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123565025)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB3317; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB3317; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB3317; 23:mJFTny+VJpLs6gGbb5BV4J9XNC4NmKd/hm7GNLv0E?= =?us-ascii?Q?9358kxuS+eOtsYjdn049sBQ32wHSt8tNgxmXdfWUxj3yJZZwuc6tyDQSY7wJ?= =?us-ascii?Q?gYyAmTceY+mP3GQ75pEBqdTqzecMswH/4GEl0lNL028Kw9ea15VAtGKG2Vtd?= =?us-ascii?Q?MFtRttFeaEymY6cR0eYsM9fBn5Q7A9HFtSt2AF4v/3jK1gWm8tS/MRm9YWRB?= =?us-ascii?Q?VzIfxm3nZ26RKX3VfXqQVrnRkNaRY9uHurhCIGCiE+YUFi6DnPIqJxN3aFdf?= =?us-ascii?Q?RY2q70KCy+78fRH6Qy6Pcp9g00029oOufqdTBVQKlS1VfVcdB+/+CCRXzUkE?= =?us-ascii?Q?mZ89iPQGvrp3DZbBExhlGzFFw2FS0qGUEynvhQi6Qy96mnUm5icWZElNxIRR?= =?us-ascii?Q?/c3s5mdROjg6EgY3lphIGbJsWzosoLGpdv/7gdFuUiimWg0KhLTbRwVnpxxN?= =?us-ascii?Q?GpGHj0By2qAwdae9Rs8Vk4OWVbQC1uYUiunLtihF3H/NfIG6pWAMbLoFlkSS?= =?us-ascii?Q?Re+dTKJc3AlQhc3FP1uIhP1t0YDISPlAPxOjpiYa75QFpH6FXskQDcfFxUkb?= =?us-ascii?Q?KZ3Dm97JHGzqcrSINxhe3a57gHj+/AneXNg5WKIj/GADCH8uS2KqHQA0EPPI?= =?us-ascii?Q?ii+uC7hJl9meu8j6yC+dYquM39zH60xBWTgAGlg4VUN3pacb7KInLHqc4IOR?= =?us-ascii?Q?xkGa9eezU91yGfCV3px/QbOPt67x56F+cV7BM5Vltw+FNQQKSpeD46+sMhdh?= =?us-ascii?Q?ttIjG2SJtumniUsJqo/N8KYYwkU9/7KTFlyVmBZgvWg4KmYBgNjXaeTdI7zP?= =?us-ascii?Q?mDk4o5eSFOcyNPTX4YXY/UNQomciBna7FOGjh90ridxF0Y8FNqlq2KZb+E55?= =?us-ascii?Q?U7xay4EO4J0xq5fZQtkdqG9NvypxoZ+BNyjl3dPuVy/1EszMpZ0wkBOD9OjY?= =?us-ascii?Q?lupP906hVh0mckoxHbOWzRKnUCHEeAB+71nGRDO7JUirclo8bPZvRe1PSB2Y?= =?us-ascii?Q?aM8ykB2JybML4+ebJP8ztFMz246PMHcHTByKMfGw0toEidiBkwMSTkQobKsP?= =?us-ascii?Q?bT5KidWNdSW4OrRJkSSxfnKP0VecjsHFPWPlgXYfsM8hj/gZM2XeHH2pRHRQ?= =?us-ascii?Q?spbIUew2a4=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB3317; 6:pm6ytS1f8V7zBi1dV7lCKIhqdR5BgP+N8TZhskXw0pfDhkb8b1Ht8/c/9jQOmTHHmVUY0LieuseyBFnVMnzVQphDxEyLk1JdPDVnAzaY/3qhV60YpxHoj8Z7Gwq2tkyiiQy2ldBk18vIGfIYlpDjM9IWdxxYc/EF6bjTNosO8mSLqYre/g5D1gMN13NIIAGpoks86RP8+ST3Xj1hU8pBCatl7JPjq7e7YHN1HWnrpubQlRT5H7Xgt1dcERwHRRhuxISU7bd/PlCb8rM5XvE+sn3UQKAYy7wCMES05D+AQ/CsZry49RiCSRaFudFRwnJAL1XoAkhHEWAG5HtRuD/ROg==; 5:A9g0exXyVZoRvOCCVK3z5YTDKcOAr9vo7TxfSkKMPNi8WBy7i3dHZej/hmY1PzoeEAMrT1HUmKdXvmHyAN4V7xcAcjnYzZXXTWjf2XXGmlUDxTbHZ4793kEpV0lEpQUGFZfBcOXtIglIA3x6YLnmDQ==; 24:wlMFpJTtMgQJIUkk+3zsgFmnm2xkMLCcYLsodtz8yrutgIZG4tNNdoSm9zIr8/YxXCaq21c1NPnavfIEtnAjuMN5cp0zuZtkArATgADmNRE=; 7:wHY+BPc2aNDV6dG7cpcSuLWKa+/dfhidLX+RsIpNDtXECysv790Imym3i9NyoL1BNJc7rCI9otl/2Lq+vcHa9j4dN36qxsH6QxNtUaXBQLoHJ2UuhQaO0UkTpRKJh4R3aFCdDVJ+EbLbTEzd/yLZqbhu3ihx9M7op8158QokzyX9qNQ4BmttxQG1ZZslxv4M0nnfGyaKeh96y30nEjGuqe82tPVoSgQURPMhLJTzcjc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:06.5882 (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: CY4PR03MB3317 Subject: [dpdk-dev] [PATCH v4 18/41] 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: Sat, 09 Sep 2017 11:11:11 -0000 Signed-off-by: Shreyansh Jain --- drivers/bus/dpaa/dpaa_bus.c | 5 +++++ drivers/bus/dpaa/rte_dpaa_logs.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 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_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h index 3ca3f9b..253962f 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", \ @@ -63,4 +64,31 @@ 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, " >>") + +/* DEBUG is conditional to compiled configuration */ +#ifdef RTE_LIBRTE_DPAA_MEMPOOL_DEBUG +#define DPAA_MEMPOOL_DEBUG(fmt, args...) \ + DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args) + +#else /* RTE_LIBRTE_DPAA_MEMPOOL_DEBUG */ +#define DPAA_MEMPOOL_DEBUG(fmt, args...) do { } while (0) +#endif /* RTE_LIBRTE_DPAA_MEMPOOL_DEBUG */ + +/* WARNING, ERR and INFO are unconditional */ +#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