From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0087.outbound.protection.outlook.com [104.47.40.87]) by dpdk.org (Postfix) with ESMTP id D857A9981 for ; Wed, 23 Aug 2017 16:03:13 +0200 (CEST) Received: from MWHPR03CA0023.namprd03.prod.outlook.com (10.175.133.161) by BN3PR03MB2260.namprd03.prod.outlook.com (10.166.74.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Wed, 23 Aug 2017 14:03:11 +0000 Received: from BL2FFO11FD019.protection.gbl (2a01:111:f400:7c09::121) by MWHPR03CA0023.outlook.office365.com (2603:10b6:300:117::33) 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:11 +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 BL2FFO11FD019.mail.protection.outlook.com (10.173.161.37) 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:11 +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 v7NE2Q38004389; Wed, 23 Aug 2017 07:03:08 -0700 From: Shreyansh Jain To: CC: , Date: Wed, 23 Aug 2017 19:41:55 +0530 Message-ID: <20170823141213.25476-23-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: 131479705913380443; (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)(104016004)(76176999)(2950100002)(54906002)(53936002)(48376002)(33646002)(626005)(1076002)(2351001)(105606002)(50986999)(106466001)(4326008)(6666003)(5660300001)(47776003)(50466002)(97736004)(86362001)(77096006)(6916009)(575784001)(68736007)(8936002)(356003)(2906002)(81156014)(85426001)(189998001)(8656003)(5003940100001)(36756003)(305945005)(110136004)(50226002)(498600001)(81166006)(8676002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2260; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD019; 1:5sqU3SisOc/CG4ffKylxSf8ulNLgw5/pboTxQgKjk+64LCeNwcHw3+PjOM5O+FSiNe4r60H/4Q+xaIQWX6/W25DWfjyHb3YbVaUKtNuBH5BtWHNBOsV0teeRuioyPFp5 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 611bc1dc-acc9-4300-6d10-08d4ea2fb098 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603185)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR03MB2260; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2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K+G2q5loDPDuIH4AWESlCKvfyaBF4fo9lBrWEMnb1WE0mHm6ZaETlzA3AMbVKW0xuu131pnmAz4lge9rWXRcJkj8Tunj4b7tNYj+cbkm+so7UBcDZ7wQIH8GRUyh5jXFWE0nu6Ht9NPTWpy6H/sbRQGadrI21fDPQsQ5c5MS6IuLxoqWLQVXBd0c+JhHV7De+C5ieQdAj4V92HfT3GvErdT+SIRfhlf3H81soCwfNckOaSs8zM8zh5JUwjtlLc= 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)(5005006)(13018025)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123563025)(20161123561025)(20161123559100)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2260; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2260; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2260; 23:NJhVNHyokuiQzTQjq2FxmzMvm5J0mtKxBGndlIZG4?= =?us-ascii?Q?N47rDe49JNf7tAiXOQ90WmAbreEv1NtnG0B0iDF1bCQzz7qsBu2SNlzjqOzJ?= =?us-ascii?Q?GSlrBEiYBxHtvWAuuXS+Zj6I+s7Lgswr546mBBlWIPfw5ybZNzgD1ojDbW0Z?= =?us-ascii?Q?0lwEw+NoFww05d9jg162jBywqf6WmYs8jzoLP4GyrKkPdOk7qwSoUJbymmMl?= =?us-ascii?Q?n7SF3CGqFdOqjXJmFQYAPIYCi65KWjJOltm2pXp7yB6C/bGauHxrFQW/chR1?= =?us-ascii?Q?Q4J/hyFHV97L9FtAGsRr27f0GdBECMo27rRlxLLXQeE7H4JZcftbue20pSDo?= =?us-ascii?Q?WNd+pSwbrv61U+HYB9MhiKEJjpJ+7RVxACN2QgTFOMzyNgVcUy1GPWqG25av?= =?us-ascii?Q?N/uzyzGccPbt/rOF55mWMvcIL2P9SN8JHmgotcf3EPjNUyhKUk4Y8t0MYfEo?= =?us-ascii?Q?lBrAkWV8UB9VvWFqRwtSgQniHjdzNc7GlQ+WvIwsJu7hzAMP3I3K0YbzKBCP?= =?us-ascii?Q?/URM7+5muW+NSjTzOD1lokuZPBbdXbYQOcNlKRC2KVSFJD8Wy0lSgDtUdhaR?= =?us-ascii?Q?ztBopfzAZtE9G2v2YF31Wl2dB/yN89iA4ULsAb2mOZVu84PcHqHMsWwWBUSp?= =?us-ascii?Q?rP60os/tdFPOBvJcktPCVE+YITQPDxHt01fTDOL/27xFsgww/pP/1BXmxznl?= =?us-ascii?Q?yG7Ud3Rta6XESD6AB0fHJsLRtw718apwhe+mgql1czAr7hokqFva0sftKtaU?= =?us-ascii?Q?FviCBtjj9NuTXhB4DHHNVnaaCzWYbfE6qLPFYIknZ7xYkcqNoradlzWkMdtN?= =?us-ascii?Q?8zwu+8YcFk+8veFFZeVNxF445LTxGexNEX2qKyHwbI3eXaMt9C2NNZsIwlbP?= =?us-ascii?Q?h6OGdOiZdq39G/0uooEAHj47KkyBKCBNHF0K+hMMNz1ptDCbOEEVN/nBTsxj?= =?us-ascii?Q?m/aaMe9mXbI1USXkTsQfqZIHopQCGfSlncXYcIqiETmVhdKwNrFOpMASsr1z?= =?us-ascii?Q?D43NfJdjjI57zIWgThBZSnBwWc45i4wb1aMu3cn7AdevssBR9buN2Qp4DMn0?= =?us-ascii?Q?0oqLSjmS99FUciwCR6y9sDWAlSARlT/rprdAedK6F4Ta/1c74KH/CGp3XGbQ?= =?us-ascii?Q?wplnhzPHBnWLPZPn+0i05yI4h+NUru0Sj5ubRGOrueRO6wp8Gpse1b8Vnfnt?= =?us-ascii?Q?MwtStHeU4Bd/PXznHHjiyIa44SCW4cbw5lN?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2260; 6:poV+wU2s+8ATNolCHf8JKaz4rw3mXFDt0+o3lHS66kVv+kSHojTpSoYEyV5wzmu6voR3nyF5xS6oQalbQiVIB9S55WFJSQbrEMfNlqdAuH1SGNIm4ffMj4tU3WrGRAdrm1HRM/tnwWgFXZRvJgnFPbaX3+HIKXGYYX8gRnvfYa02iKb2Yec4gKKZyrux0yF5Trobe6+ihqYL4bqm3t6oKg39PejJyzklVF2uAPf1RTQezSQWyJyuhU0rOugXoi3hexJ4JDSBV0/MC9pO5691Jj34hQN8ll7eOhowo3mxAfmWV6wi2qeojPgKnNVSJcopMWwuz1HVZ2vi4M/hQkKOsg==; 5:oEE6OLGoT+4b509N9uFJS44Ok1yAtCI8+kOsP4NehKeceFxdPmgPjh+XOK6+0YIyD9F0xePthwzLWFf7qPoUT871Y1nVqGjx58IKpg2z360A98ZjPBGdsijhfmdkSiapZkTUSEIqZ3keczj0U4jlZg==; 24:1k1AC15EOlqEjIuvYl3Rr5YWhVOm5JFlPwIAzfP/N2XdeO0WkqnMASHs/oxtiYsEjlZ9QYOxR3lEXkI2lyySUlJc+Rcnu1ec/ghDHgW9yjA=; 7:6LtyUOvV2VKr3kJaaW7g1TymRiDkBmFH2Vu7nXdnyisatRkCves5pQCiLcAofPWdOJ9Pvr+tAnAAXdZkIzKsPYUgW+vJ3UK8uITvpepnmi2MpMUXJD7V2ANmxfcz4w5d/z4Gc64Y76wtMu9xZaunDlLY/cWQgp03hSJ/gC5nF+CGbpW2M/h+q3959dFvkgqkAdtGRsXURbGRlXJ4QGeI1FLYRx1FcryCDWo8NMhDwXs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 14:03:11.0104 (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: BN3PR03MB2260 Subject: [dpdk-dev] [PATCH v3 22/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: Wed, 23 Aug 2017 14:03:14 -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