From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0060.outbound.protection.outlook.com [104.47.41.60]) by dpdk.org (Postfix) with ESMTP id 2523C1B223 for ; Sat, 9 Sep 2017 13:11:16 +0200 (CEST) Received: from CY1PR03CA0037.namprd03.prod.outlook.com (10.174.128.47) by BN3PR03MB2259.namprd03.prod.outlook.com (10.166.74.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Sat, 9 Sep 2017 11:11:14 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::104) by CY1PR03CA0037.outlook.office365.com (2603:10b6:600::47) 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:14 +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 BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) 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:14 +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 v89BAUhM026326; Sat, 9 Sep 2017 04:11:11 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:13 +0530 Message-ID: <20170909112132.13936-23-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: 131494290745842549; (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)(1110001)(1109001)(339900001)(189002)(199003)(8936002)(8656003)(86362001)(575784001)(50226002)(36756003)(1076002)(104016004)(356003)(305945005)(110136004)(50986999)(77096006)(76176999)(50466002)(8676002)(68736007)(48376002)(85426001)(5660300001)(5003940100001)(54906002)(105606002)(97736004)(4326008)(33646002)(2950100002)(47776003)(189998001)(106466001)(2906002)(2351001)(53936002)(498600001)(81156014)(6916009)(81166006)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2259; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD045; 1:ta1+F7YYDORv6fny3l8JrCQlvX5nENU/+3+yPXCrbu7nJGP3bAQHBP/W9eXFv53t0vKok41pbi/r5t1KaD3OLJdtTWQ1EJHla97JOOnJPfhaihAehQRIz566t2wiiQg2 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e969dbd-3603-49b4-d07d-08d4f7737c49 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR03MB2259; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2259; 3:Wrb7zwdGrG6EGe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QoN3txKAHV7rN8T8G7dYYENUuh3G4jhb8V/GfBiyon4b6YHpHJWfM9YWycBmMCF8Tdz2hD1HererD8Q/tyiGMB9468hp73cbCGPNciDzEAFfB7g9aRnCsdiYVgaOv8rvQL5Y+nBO1/alo8VdISW1ywuf1onKwK98TKI7OrAn0mNamzixK2aPN1IWtQRdjF4IsybUr4rADMpJ9IkYh8WdB1o9YSJJs= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123556025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(20161123561025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2259; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2259; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2259; 23:dXkr5dfs2k/Rgvn59LXjv8ythQvHU6vBrKHY0YItT?= =?us-ascii?Q?hLZVcIoJmEi0OAHB0vNMKCMecIp8A/btKG7IFsp3nYVUDdUiFWuu7Ydb2sIV?= =?us-ascii?Q?fCnBNe0LO1JT6buN0UfSMJjyO9ly/sQk0ZQFXu5nVMPWqKrhRA0rJxKunZXo?= =?us-ascii?Q?gER6w99LFOtz/AuIrIAELxBqift5eDc3uCwS90vHJneUBDrRfKWDHYO0mi/9?= =?us-ascii?Q?nLXJKxmMi7U0z8aIrPDgTswMmQU7hBzKw8s4nEIhwDTeyczKoVyWgpmrfknU?= =?us-ascii?Q?ZITa+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PxeJK20Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2259; 6:okYtsksd+IsFlWS1g+8SdtHpxMbpvA6lBK8v5Ofy4UyYnYuK3bdJTPo+jZSTxlCMzKn9j3OLfiFqV1ywu3PuF5BngFid2+gojaKnoa7LV6+/wMfhjn0qTZxAnSkBSwWvaRVS877ghirxbnzgTDq3IARpOGzBv6CIaxSqqnMREzHiC1vNa0aQCOpEbILzhQ7acG0ikdZSMfNq9bz5iWD8vg1HSpU2xVy1uFY87W7jLJhaUx4Za1xcs7Kx/deTMNjU896MfvVh7z9xnV41nBz5NK5+tY1EYFuw5pF+fv7FInOOJOmUTzrNA2t0YKdJUH3i+9UxlgJHjacgQdw8yQTe9Q==; 5:xMQt7JZZrz33oUp87qsa2nA1arU/Sxkcx83vcklSLNI0dZrco3f/l+14NrpupF2/TJaBnq2Qi74qkyWLF+3MzuoqV4qYLxze6e5eunRSOhU1Z5KZQCRC9ZaVH2EouAgmzx+iTxqgxnQRijxW1nxtuw==; 24:H7MxYC/TbW3hhvUiS/zO4GVb/ojANWroW0erY+eGU2bFeFLLxEFYPSGPk8WV2VpAvraFYwRlcl6jK9uhJNEY2vRidQHxFFF4ZF/yY0OcFr8=; 7:fG1t2eiGfhnNcrQUH8978GlHEPDoXe5p2F3D4h/lA/7dCejsScaa/IyFzvZWBSpCPsnhkSzJPiGr92ZdXe5o9U7fnqHDrSgXLddzdjOmwQWxrrey0JEY5BOsVRhkq0GoDp0tc5sOhshCSd0YpaoIXoloMuPqhl+kJNBxUtc4B6uw9JOhRiUqfp6YWRQ6Aq3ezV9/yBwjWYFcBOrv/+pK54tDTvF+8AmcGiR7qLIxosE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:14.2722 (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: BN3PR03MB2259 Subject: [dpdk-dev] [PATCH v4 22/41] 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: Sat, 09 Sep 2017 11:11:17 -0000 Signed-off-by: Shreyansh Jain --- drivers/bus/dpaa/dpaa_bus.c | 5 +++++ drivers/bus/dpaa/rte_dpaa_logs.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 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_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h index 253962f..8442e0e 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", \ @@ -91,4 +92,39 @@ 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, " >>") + +/* DEBUG is conditional to compiled configuration */ +#ifdef RTE_LIBRTE_DPAA_PMD_DEBUG +#define DPAA_PMD_DEBUG(fmt, args...) \ + DPAA_PMD_LOG(DEBUG, fmt, ## args) + +#else /* RTE_LIBRTE_DPAA_PMD_DEBUG */ +#define DPAA_PMD_DEBUG(fmt, args...) do { } while (0) +#endif /* RTE_LIBRTE_DPAA_PMD_DEBUG */ + +/* WARNING, ERR and INFO are unconditional */ +#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_RX_LOG(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) +#define DPAA_TX_LOG(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) +#define DPAA_DP_LOG(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) + #endif /* _DPAA_LOGS_H_ */ -- 2.9.3