From patchwork Fri Jun 10 17:24:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Agarwal X-Patchwork-Id: 69761 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp250811qgf; Fri, 10 Jun 2016 04:55:26 -0700 (PDT) X-Received: by 10.140.107.198 with SMTP id h64mr1272545qgf.36.1465559726133; Fri, 10 Jun 2016 04:55:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 86si6052945qkq.217.2016.06.10.04.55.25; Fri, 10 Jun 2016 04:55:26 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AEDAB680E8; Fri, 10 Jun 2016 11:55:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7CCDF680E2; Fri, 10 Jun 2016 11:55:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 78122680E3; Fri, 10 Jun 2016 11:55:19 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0063.outbound.protection.outlook.com [157.56.111.63]) by lists.linaro.org (Postfix) with ESMTPS id 90810680E1 for ; Fri, 10 Jun 2016 11:55:18 +0000 (UTC) Received: from BLUPR0301CA0038.namprd03.prod.outlook.com (10.162.113.176) by SN2PR03MB2384.namprd03.prod.outlook.com (10.166.210.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Fri, 10 Jun 2016 11:55:17 +0000 Received: from BN1AFFO11FD020.protection.gbl (2a01:111:f400:7c10::171) by BLUPR0301CA0038.outlook.office365.com (2a01:111:e400:5259::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8 via Frontend Transport; Fri, 10 Jun 2016 11:55:17 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD020.mail.protection.outlook.com (10.58.52.80) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Fri, 10 Jun 2016 11:55:16 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u5ABtDsV002957 for ; Fri, 10 Jun 2016 04:55:14 -0700 From: Nikhil Agarwal To: Date: Fri, 10 Jun 2016 22:54:42 +0530 Message-ID: <1465579482-15938-1-git-send-email-nikhil.agarwal@linaro.org> X-Mailer: git-send-email 2.8.2 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131100333169820205; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(189002)(199003)(77096005)(8676002)(19580395003)(69596002)(106466001)(92566002)(105596002)(68736007)(19580405001)(87936001)(47776003)(50986999)(81156014)(81166006)(104016004)(6806005)(86362001)(5008740100001)(5003940100001)(2351001)(229853001)(11100500001)(36756003)(33646002)(586003)(110136002)(107886002)(50466002)(450100001)(97736004)(48376002)(189998001)(50226002)(8936002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2384; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD020; 1:H8QCtpfal9yozOty9MzmpotiurJhb5CPbdXhK1JKIstmBV2+VclcrXlcM4VGjtQHRb5WiDh46q2qpgSr5vbd1wY+tS86F1jB/tBPYnpjVKrUsa9pqBo3O2QiT50tG17j0TT/Kicp/dsudPr2uSrymUUmS6wBnI3G0uwQYLmJXHzwfJVPXq23PaXcQQPp63astRMd30MbcQpGFuP77HHCrFXAVaUUBRQ3yu2hG0vIH+f49MCUlm3aSHgWnreVIQSZPh0mehsT18SYSzkbRMjhTwiJrLfdarLeAwT1y5pMoQRjK5/uUOoc03IThzBRL1nvr87MSiGKICv7tdjbbqmYclXvzby8V/Q3jMNwGvJ5n4FXzE5jRijvIeVMO3z38FH3MjVKzoI1nbccFCrIUxK6MyH0t42468E+ZE32aXYBYWUyVr6GzGQoDoCjWBSQZ2OL8E/aJlSR/2CC8hKt6G2Yy9CMis+7IrTtzpNiZ7NWeE8jLNtgb3vIkNFy6iHDBp9xSXJTLfrSMwG/uSTRItaO4A== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8d94ea92-e150-44e1-60ce-08d3912616fa X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2384; 2:9YrW/rXXS6gEXPFQvfc8C0RU3J4X57QLRd37DqGM6QmF/P413SoZPLuEmpC/aP9eqFnjfdn3PbENnz6Dqls5j47mlOANwYSHuuSmje3bPaKkWhEShz8ulVA4sxhtO14WHKsqgwVUU+xBFTXv1kjUFFs6yLVih3GSELyGH6CDOGOuLZbTSSrHWKI9La/mwCAF; 3:qlZNy6sM18QSCWeF+udGuDLTKUXoUNHPJF1+D68GWiyN5LET77LR9uz8DafKtYmiSKSXYt1LsaJzFrzNn1oGohyLjoEihtpNciyc7xS/7K31tg9l4uQZ6xHI/6QL1qxapGF5AXUAx0vsDUAW9jH8r20QP9owhU5wqDV6QGWpr283D52c2nNPS00bI9Rt8mzl2eHQTUzn+wywHZMDwa6WNkyyzS+COJp1c6wWFDPYAh4=; 25:FsYdsUNfQVkb7CGHoEWfvBLA8+L81P14xfL844iKBg1KKEhO5QNvzdgn5ho39FDOQpvHqvhTdWqae3laZ3ZluGPPWJ5G3RHFE2CFEkA8of3k774sgkRepKCIjH5TIcd4rKwhExMai6tLJSmFVsU1aYB5BDdIRDrCHrfTSIp8dTKajKhL2OZ9PcKRnaDGLnGZJo5m7dvaaBJV/eXeKuLFtm1Bfl1o4TnppSNxlPbt7+gSRGFYO5v9L2+hrwLzMW8vWA/viJ/ALcjAQ8J0CtwWY90uM6qI7+QKncqD/xEr/azWim/sZzRuwArRWkB1xtcP2V3fDeEDNj0w0k5WUbekkMek2ryvctzpPWPwZeDLvtG8I/Rihbug6SHPQmn+XynJbi8uKfe5p1jzV1Na6N2NueiyK6QnrWPgvSEC8YugVY4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB2384; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(13024025)(13023025)(13017025)(13015025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB2384; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2384; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2384; 4:vtIMvmifiEq2ib3ehvKoxPEsChNE3wsv+F7M7a6Me75KT8sYng7l+hQ8aNoc2FeKcqdhLkpk7tipq2cnVZDpMbnfFPRXlA4cFeQt7lcq65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0gVK109T5ZbpyQDKX/XHf/Dc4O08TLCg46BI8Yz7CmSt1b3icn7YLhRrPwnLWuHKTigpdP1lUn7Pjr+cKWA5gTTqMBC2bkO4RJ7GMLZvADVBdDA/9Blw9mdz/NGsnqxx8LI8Ywv9NBAAwM7pXl95jnrerpHpQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2016 11:55:16.3736 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2384 X-Topics: crypto Subject: [lng-odp] [RFC API-NEXT] Adding crypto statistics. X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Nikhil Agarwal --- include/odp/api/spec/crypto.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 7b4424d..05e9221 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -330,6 +330,37 @@ typedef struct odp_crypto_capability_t { } odp_crypto_capability_t; /** + * Crypto Statistics + */ +typedef struct odp_crypto_stats { + /** Number of outbound encode operations requested */ + uint64_t enc_requests; + /** Number of inbound decode operations requested */ + uint64_t dec_requests; + /** Number of operation completed */ + uint64_t operation_complete; + /** Number of outbound bytes encrypted */ + uint64_t bytes_encrypted; + /** Number of outbound bytes protected */ + uint64_t bytes_protected; + /** Number of inbound bytes decrypted */ + uint64_t bytes_decrypted; + /** Number of inbound Bytes validated */ + uint64_t bytes_validated; +} odp_crypto_stats_t; + +/** + * Get crypto statistics. + * + * Fetches crypto statistics on success. + * + * @param[out] stats Pointer to crypto statistics for Output + * @retval 0 on success + * @retval <0 on failure + */ +int odp_crypto_global_stats(odp_crypto_global_stats_t *stats); + +/** * Query crypto capabilities * * Outputs crypto capabilities on success.