From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0050.outbound.protection.outlook.com [104.47.41.50]) by dpdk.org (Postfix) with ESMTP id 19E3F5F0F for ; Fri, 5 Oct 2018 15:00:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2mCxPdcAIlrrpmxgRlS/WD2T9xrYc3p2sxM+vHb19Fo=; b=Jbnd1F5bWfNsjC0dXx6zvU9ln/SKwos9jppDmVg3pATxgHkFMKKsFLSANbeyJ+0cNllHBM11n39kzEVTheZBBq0warjmfUuDW2XgJAT0R4jK9tfyG74lfudGLmIFGKAzkzFCBegZW0+hVOCFRZMJ4ksdSNYbCctA9qcbHexF47A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Fri, 5 Oct 2018 13:00:09 +0000 From: Anoob Joseph To: Akhil Goyal , 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 Date: Fri, 5 Oct 2018 18:28:52 +0530 Message-Id: <1538744363-30340-2-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538744363-30340-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> <1538744363-30340-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR0101CA0036.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::22) To SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67f824d7-1264-40cd-249c-08d62ac27d95 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4910; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4910; 3:bZCvZJXE8fky5J4/i0/1ENcTTHuOXhxnRE4tSNSBUyKw4lhDI84Miy6a/Qgp5gNeYr38hB0D3jQ5DIqhfl69+sN8U84IfcMn9uHQXB5D9Bg+g7MY/Npi/gNTjCz6tt/QaZW5vt2iCFhIDVf8vtrR6hJzW977l2jHGrDREGOyM/7eDQ2oDdFssNB/aYvoM2jmxfHmZGLSosRV/zqvD8Qh2xZzrzED3u9h7w5X9+QcTWmBLx5FRdGtkp7J2xeSBfKK; 25:ukNN+cs84nv+h22pcjUhWTOc/ryOYQV5kDX8bSBp2MIOALJylEy0mRh8MaE4Xwoved+lJzjuS6zHFjQa+1rOO+MdaN7Emge4qGflSJAIcNBaUiw/zq+lx5ZthbCFwCncLmNQ5aBJ8XDmwKolo7StsbKO8GauEw7KOuvXJjRrFDhG9upHNk2HZbQ4hKGs0xFny2tRij3ZGuHeZk/ccj51LjJNkzmE/TSayAfwgyDotpi6U2eL3faICYuYDbKzkzjydTIqGoYuppdoV73AvLplg1sJw9vG6e97gs3L3ZPz+8GEJoOj+p5K6oQvUocY9ejOnrwE89mTUY7Z6Sv1/yuIaw==; 31:R5FBKbt4mT+ICuWfkRXivfxEMxWEE3ftSCf6sykECc70HQw1nWSVPEi2dYZwvPyUyOBgSM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QZPdXMnnAA3Fb7r76NfNn6eQcuKxJmhCXvByS/TVdOSKV3YavebUhJjufuG75VJUSfTlU0JAciYyhZ+rf4vZ6W4mWpR8ztzQ99 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:SN6PR07MB4910; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4910; X-Forefront-PRVS: 0816F1D86E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(136003)(396003)(366004)(199004)(189003)(51416003)(76176011)(11346002)(50226002)(25786009)(8936002)(48376002)(305945005)(186003)(16526019)(110136005)(6486002)(3846002)(446003)(52116002)(6116002)(81156014)(8676002)(97736004)(5660300001)(50466002)(4326008)(956004)(42882007)(2616005)(68736007)(478600001)(54906003)(7736002)(81166006)(6666003)(16586007)(107886003)(26005)(55236004)(66066001)(386003)(47776003)(6512007)(72206003)(44832011)(476003)(316002)(14444005)(36756003)(105586002)(106356001)(486006)(6506007)(2906002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4910; H:ajoseph83.caveonetworks.com.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB4910; 23:XiAdnJ/Q0irhzFe5mNP9uqX9GdgKd01jfRqdt53JS?= =?us-ascii?Q?29WPfEMERuePBfIjftfoKtTLmafDw5z+vqEuVfc+uJnyPPGLGugoX2jgT5WV?= =?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HFOwilowXmdoxsFdVd+GJY0YT1/q8824PRe/qGlvJPad7MCG3A4rVaqqMNfLXGvh4/LdtggQ8O79IWfNXq7oR+ths04g/IKMpz4UWDOVBZGhdh5QAhby8I1hzWYEOep5MrXt0Mc64ygnpf3MtdFA2+CS3nS7KLhjVhrlrf6Zt6DaxbxlU4F1SyX2fYu0H//eYT2wz35/vCvyxNuWy+n4YJx4w00Ls7+f6m44wAI75X7CrxK9JkIBA==; 5:tJt4SK4qLcMFUHZvlJOEz4R77Xmwz4TOip7M2Kk5TBgUPNECQCZcWcq0EEbANwVnS96bpVbn/eJ+BgzB2RAByDjuX527Mti4+4xU+1p8BafpDy+pGhG+nyvKoq2J2W97pA2c3sU5id05CKpiW1eUhkV7cHGGR37owgHcB2SS/c0=; 7:XSSQ6d06ESwNNuNXvIZvd6lLrlCH196l+UvrGPa/ajwkzNlkTMu9BCrqIsCThFSKRKYTlRQ5i3oEenkmd/QrKuk4bCW1ISg6rWkmh9r05Ye0a746r4O1yxs24ANYU4UhjBwBJnEnXJq+Xf8JpTs4gVN9i8Ii9g/AmGlMKh02pY3mPrvD8CLGY0QYyIn77Y2EhX2/RnrOvQ29AIlwiNzghTYYInwXDssFvp98/SyfkHE7UpN3RBsm0klnIrZ4EI8V SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2018 13:00:09.3309 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67f824d7-1264-40cd-249c-08d62ac27d95 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4910 Subject: [dpdk-dev] [PATCH v3 01/32] 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, 05 Oct 2018 13:00:15 -0000 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 --- MAINTAINERS | 4 ++++ drivers/common/cpt/cpt_pmd_logs.h | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 drivers/common/cpt/cpt_pmd_logs.h diff --git a/MAINTAINERS b/MAINTAINERS index 5967c1d..52202b9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -772,6 +772,10 @@ F: drivers/crypto/armv8/ F: doc/guides/cryptodevs/armv8.rst F: doc/guides/cryptodevs/features/armv8.ini +Cavium OCTEON TX +M: Anoob Joseph +F: drivers/common/cpt/ + Crypto Scheduler M: Fan Zhang F: drivers/crypto/scheduler/ diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h new file mode 100644 index 0000000..4cbec4e --- /dev/null +++ b/drivers/common/cpt/cpt_pmd_logs.h @@ -0,0 +1,50 @@ +/* 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_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 initialized + * by otx_* driver routines during PCI probe. + */ +int cpt_logtype; + +#endif /* _CPT_PMD_LOGS_H_ */ -- 2.7.4