diff mbox

[RFC,API-NEXT] Adding crypto statistics.

Message ID 1465579482-15938-1-git-send-email-nikhil.agarwal@linaro.org
State New
Headers show

Commit Message

Nikhil Agarwal June 10, 2016, 5:24 p.m. UTC
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
---
 include/odp/api/spec/crypto.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox

Patch

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.