From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0076.outbound.protection.outlook.com [104.47.36.76]) by dpdk.org (Postfix) with ESMTP id 307FD917D for ; Wed, 23 Aug 2017 16:03:05 +0200 (CEST) Received: from BN6PR03CA0090.namprd03.prod.outlook.com (2603:10b6:405:6f::28) by SN2PR03MB2271.namprd03.prod.outlook.com (2603:10b6:804:d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Wed, 23 Aug 2017 14:03:04 +0000 Received: from BY2FFO11FD023.protection.gbl (2a01:111:f400:7c0c::199) by BN6PR03CA0090.outlook.office365.com (2603:10b6:405:6f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9 via Frontend Transport; Wed, 23 Aug 2017 14:03:03 +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 BY2FFO11FD023.mail.protection.outlook.com (10.1.15.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15 via Frontend Transport; Wed, 23 Aug 2017 14:03:03 +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 v7NE2Q34004389; Wed, 23 Aug 2017 07:03:01 -0700 From: Shreyansh Jain To: CC: , Date: Wed, 23 Aug 2017 19:41:51 +0530 Message-ID: <20170823141213.25476-19-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170823141213.25476-1-shreyansh.jain@nxp.com> References: <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> <20170823141213.25476-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131479705835666314; (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)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(81156014)(81166006)(50466002)(8676002)(1076002)(6666003)(2906002)(6916009)(48376002)(2950100002)(86362001)(68736007)(105606002)(47776003)(106466001)(2351001)(626005)(50226002)(189998001)(8936002)(33646002)(4326008)(76176999)(50986999)(54906002)(356003)(5660300001)(305945005)(110136004)(8656003)(85426001)(77096006)(53936002)(104016004)(498600001)(36756003)(97736004)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2271; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD023; 1:DozbcNhbGCxlAb0/BEjmM+JwVmqqiI7dSq7gw5FNWwL458IcZYR7hcQdaCSsrl6yy9Pv2hJK+LKnRYymC4zTvdcyB4IsK6B4rWnxq2lW7CbVhG2RWd6UjG5aRWIIY171 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84f1f318-1fed-4c66-fb8a-08d4ea2fabf8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR03MB2271; X-Microsoft-Exchange-Diagnostics: 1; S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lCi5p+JOgDN6AajmNh64ZaK2o6qkoHRr5pZ0hNOaRTy72VHh0jbYjkyyOoET5bvV2n1YchzS8eUlOkZsAOSErEDZImoYL9b/32o9/zUKhZr4RaZUpdPb0nP12QdjLr5LhabidemOWzXBP4qblijgXs944vB26MPyqMPxpys8xbpWdb1SjzSjaLT4/DVFSDND3YEjx3LYloz1nNkJqo1WdI9T0vwgkg2u4Fk9QZ9qmJgdznCzCOvDjg5nRvUDU= 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)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123556025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2271; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2271; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2271; 23:WEqDPLz02112UD6v4VX2Skpg3STRtFWqfk1o6DJvm?= =?us-ascii?Q?9MHZtybjK0OX1nMcniPPb9IGyAT4mcy01xe6W9dK5EgQoOLcPCx8WFfkXUTT?= =?us-ascii?Q?MXVRb8TtjVf9nq37CP9h+pgMzGjqhMaF5LRTUWVzkYsC6XRjyqVktQXU5QSD?= =?us-ascii?Q?Hgkhg5qwQys+RiZ4iR3mZbnht9ifPAP+a46r93gxAgWBT2FViQDUCo4W0dWz?= =?us-ascii?Q?McV0NPp/fxikaOChNeVmj2XIDfKtTiFIFNEcs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/AkYxnylnj5KF+b8X8hOGWaZ?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2271; 6:NyeZn3kvMAaSTiUOrzFNBcj/r4Xk2nPMhWGG/eU2T1QBJiS16FbuWCBZAg2sl4/W3vIHZent3wN/7GzghoMKoQN9Ng8KZxeXBogqvndAcsOrYbY51bXVHkCvxCMG+E25Locyd7m/tjFhAdsyO5cFuiTOajibGqqiShLRcoESgsgLPLzUnKp2scBdaXlO1Q5oOZXnbo7xiEfw3TSVzeCjxawHuN8GgdJofPNqt5QPsniz7kj0ClALuFX+y5YwYNVHuSjCQzn7VZhlviRmVHsgmHrgj3eEpRbE9ZQ6y3NCDxSRnj2qR0vkBaVEVTqAfZ+c+FVFxHw4bI8FxuQVXVIsoA==; 5:3zHWYpaLkrdvmn5cPEXTwBlAbqL3ajEd3OoJCdgzlw4dDQm75mIDlLKTSOgmyGtop0TY8rUmcdx836XXh0jjZiTRlYaUD3fsQ4qvmqcQObyrIzZumNWwCCgnjPw4IBguoveThItyeitPUQg8tGNjzw==; 24:IgAsaZkTEqFXvASFePt/igpZKx7oW+OrI37bvKAxCZZn5MLAzerUksf+AKE96XbXZ0qJlCdSuupfmn82qsJ4S1FKUaWFj1SuF5fBsaQs6K4=; 7:CIKzjN0irNKhQ29UeUAXD/nJSvYDtTgr6Ctq02peFo9lv4w5drfFXuL4QMZqqh2gC+v5MYvmYnkX2KHotpOqRbopKEeB7yvckDW8AA79oE01oVkNLstdhHtLPZ9YxVtdBPcC+BUhpkNsO0hcv+kKeJMEmpfHb7fBqwg1zIZNsL6B5s0XcL0Gtd09xf54AtlXi5wMMQMiIRa7VJ42T6k5fepIe6KTFv1E+Gxh8WQCa1M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 14:03:03.3638 (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: SN2PR03MB2271 Subject: [dpdk-dev] [PATCH v3 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: Wed, 23 Aug 2017 14:03:05 -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