From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40071.outbound.protection.outlook.com [40.107.4.71]) by dpdk.org (Postfix) with ESMTP id 1C0C15A6E for ; Fri, 14 Sep 2018 14:29:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hVkI9y9Q4yj9zkRsuaXpqJeKvL+cy9qZJDKber4F+0E=; b=j+LcHvUr276tbVpxbzL+YMbbZ8myJ1SMufDGZXcMjnC360YhNfQFbw1yJbr2FNviR7Ake/q2LQLirMtonjBDymj0idzf3ZpV0uNErDN8eRVwky9z+O4A1WQAw0DS5VctUjKzL1PjX1XXfGQp9RnukPWBpSbxOvSvOLXC2TanySY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.143.30.134) by AM0PR04MB4882.eurprd04.prod.outlook.com (2603:10a6:208:c5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.21; Fri, 14 Sep 2018 12:29:37 +0000 To: Anoob Joseph , Pablo de Lara , Thomas Monjalon Cc: Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Anoob Joseph , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> <1536033560-21541-3-git-send-email-ajoseph@caviumnetworks.com> From: Akhil Goyal Message-ID: Date: Fri, 14 Sep 2018 17:59:23 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1536033560-21541-3-git-send-email-ajoseph@caviumnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: PN1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::31) To AM0PR04MB4882.eurprd04.prod.outlook.com (2603:10a6:208:c5::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19ce75da-1c59-4eb9-bf02-08d61a3dbddc X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4882; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4882; 3:0dWFlzN3ZGfBMqTidHPAVs2smELqgBc8GgkmJ4XZpn3SOWGYoO5geFLqeyYmb4EjxYLw+2BzR78U9KScqGrZrWwpYUlWF5fsTXTcnEpr9r/ZrosGaykNX1n+GjqrUznMBVpAKLsqhkCGe4OBE4kQCOMvM9y8jwz2Vf3WljJKnHBDOgCQQuTzww47HPl3Vx3YhyC+4eJlfCNHGRQt2PA90MEPHY6R3El2FRDP62cfCQbe99L6HD+bNcO4dxpyBITW; 25:KU9Ugcj/Oqc/eI3+SxOx7xpjpayvilKiKnKqwHJ6DLqCwoSm4aN/su3W0Xw+Yky27G9RptWwMlk3zI4Kb6Aw9KCBMsers3JltciVTQtfS0BPLtRseiZfVb6zahgbs7quigqVIu/iYNbq+Qaqh7Uvlsc/yJ/Z2tsczl279/eCiZCpwXzCmP27qw0po/ipKba0dK76+ab0j0DWzO2DBMcJnAmqRzgmgMf79huIMRNYRZNXYhYGKfP+T4B8RBv0mwucTiegojIOq4DmSy0sV773geG0AfF89icnErD3hWmVrXle7f/HEDLh2kYsnijb+8wCnR7cr4eDgscwpBhk3si8DA==; 31:oid5VSvM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iGb8eiSsdhsXEdPzA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699050); SRVR:AM0PR04MB4882; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4882; X-Forefront-PRVS: 07954CC105 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(366004)(136003)(376002)(39860400002)(396003)(189003)(199004)(52116002)(76176011)(5660300001)(81156014)(81166006)(86362001)(8936002)(6666003)(58126008)(110136005)(16576012)(316002)(54906003)(65826007)(67846002)(31696002)(68736007)(23676004)(52146003)(2486003)(50466002)(105586002)(31686004)(106356001)(14444005)(486006)(230700001)(97736004)(6116002)(476003)(478600001)(305945005)(55236004)(2906002)(66066001)(4326008)(7736002)(53546011)(386003)(44832011)(6246003)(229853002)(8676002)(3846002)(186003)(6486002)(956004)(446003)(11346002)(2616005)(16526019)(64126003)(77096007)(26005)(3260700006)(65956001)(7416002)(5009440100003)(65806001)(53936002)(36756003)(25786009)(47776003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4882; H:[10.232.134.144]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTBQUjA0TUI0ODgyOzIzOkFEZy93MnVmNllDZFJxdDZmc0prYVlCK0sw?= =?utf-8?B?WC9FdWNLVWRDSHkzc01KLzlGc0xlYkR4MTdnTzhMQndYaHF1clc5K1ZSbGNY?= =?utf-8?B?U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EPYZYlpM0MvOqOr6ga5AyCbENyE4YGbd3ul82jpzSjNbX4LcwhJ4039/6AiEGL57baxBow6DyP+IsBEdSpe1R4QOTjI6Cmnx8gWmfFSFQOkg2LrU52JSEu0Vkj+xKEsUUsOjZiTbC95ukMuD0o8TXfpdvrDHfyKj9cSavGIM7lqQ==; 5:chklahSdjJBnZIRCKok4R1Si22Drp4L5SftZ4Rc/wJwe9FlXoebPAriNKbZ/PBtsIQ6GDne+1RA53H1YP1+z4MzU+PCQKzU83H/fNcUcMZ6jRyWFX2W3LrJwXhqCNP1T9VfU9IL8NV/qwhPilUh/W4CWu442iTMOhLvbWvsi5Ws=; 7:SSToPaioN9gVBYGSv6F4GywlXXdX4+hopN6Qqe+ZN6PCrIECkmEDOBqbcTw7DE0ZeqcTG91S+ZJRp5s8ejG1VaqE93xsviayQcJzOIgPUJE9d+aIpVU0Vr/qoknqNS5eI0WudGRWAOJ+Xb4ih/inMxbSu8qhF13uCcwChE99NbwXvRO9Z3T4w32gjL2aehGVc8L9Z2Hl7aqWU8/kwAo7+cXxsr5B/psXTkD/4m84QSLRpnqC4xCAeytkpGPHEIcd SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 12:29:37.5914 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19ce75da-1c59-4eb9-bf02-08d61a3dbddc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4882 Subject: Re: [dpdk-dev] [PATCH v2 02/33] common/cpt: add common logging support 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: Fri, 14 Sep 2018 12:29:41 -0000 On 9/4/2018 9:28 AM, Anoob Joseph wrote: > From: Ankur Dwivedi > > Add common logging macros > > Signed-off-by: Ankur Dwivedi > Signed-off-by: Anoob Joseph > Signed-off-by: Murthy NSSR > Signed-off-by: Nithin Dabilpuram > Signed-off-by: Ragothaman Jayaraman > Signed-off-by: Srisivasubramanian S > Signed-off-by: Tejasree Kondoj > --- > drivers/common/cpt/cpt_pmd_logs.h | 52 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > create mode 100644 drivers/common/cpt/cpt_pmd_logs.h > > diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h > new file mode 100644 > index 0000000..e1bfbb3 > --- /dev/null > +++ b/drivers/common/cpt/cpt_pmd_logs.h > @@ -0,0 +1,52 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Cavium, Inc > + */ > + > +#ifndef _CPT_PMD_LOGS_H_ > +#define _CPT_PMD_LOGS_H_ > + > +#include > + > +/* > + * This file defines log macros > + */ > + > +#define CPT_PMD_DRV_LOG_RAW(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, cpt_logtype, \ > + "cpt: %s(): " fmt "\n", __func__, ##args) > + > +#define CPT_PMD_INIT_FUNC_TRACE() CPT_PMD_DRV_LOG_RAW(DEBUG, " >>") > +#define CPT_PMD_DRV_LOG(level, args...) \ > + CPT_PMD_DRV_LOG_RAW(level, ##args) > + > +#define CPT_LOG_INFO(fmt, args...) \ > + CPT_PMD_DRV_LOG_RAW(INFO, fmt, ## args) > +#define CPT_LOG_WARN(fmt, args...) \ > + CPT_PMD_DRV_LOG_RAW(WARNING, fmt, ## args) > +#define CPT_LOG_ERR(fmt, args...) \ > + CPT_PMD_DRV_LOG_RAW(ERR, fmt, ## args) > + > +/* > + * DP logs, toggled out at compile time if level lower than current level. > + * DP logs would be logged under 'PMD' type. So for dynamic logging, the > + * level of 'pmd' has to be used. > + */ > +#define CPT_LOG_DP(level, fmt, args...) \ > + RTE_LOG_DP(level, PMD, fmt "\n", ## args) > + > +#define CPT_LOG_DP_DEBUG(fmt, args...) \ > + CPT_LOG_DP(DEBUG, fmt, ## args) > +#define CPT_LOG_DP_INFO(fmt, args...) \ > + CPT_LOG_DP(INFO, fmt, ## args) > +#define CPT_LOG_DP_WARN(fmt, args...) \ > + CPT_LOG_DP(WARNING, fmt, ## args) > +#define CPT_LOG_DP_ERR(fmt, args...) \ > + CPT_LOG_DP(ERR, fmt, ## args) > + > +/* > + * cpt_logtype will be used for common logging. This field would be intiailized typo intiailized > + * by otx_* driver routines during PCI probe. > + */ > +int cpt_logtype; > + > +#endif /* _CPT_PMD_LOGS_H_ */