Skip to contentSkip to conversation

crypto: qat - add support for cbc(aes) ablkcipher

PATCH In review Tadeusz Struk 2 participants 3 messages Dec 8, 2014 – Dec 22, 2014 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: qat - add support for cbc(aes) ablkcipher

Add support for cbc(aes) ablkcipher.

---
 drivers/crypto/qat/qat_common/icp_qat_hw.h |    2 
 drivers/crypto/qat/qat_common/qat_algs.c   |  528 ++++++++++++++++++++++------
 drivers/crypto/qat/qat_common/qat_crypto.h |   15 +
 3 files changed, 433 insertions(+), 112 deletions(-)
drivers/crypto/qat/qat_common/icp_qat_hw.h +1 -1
index 5031f8c..68f191b 100644
@@ -301,5 +301,5 @@ struct icp_qat_hw_cipher_aes256_f8 {
 
 struct icp_qat_hw_cipher_algo_blk {
 	struct icp_qat_hw_cipher_aes256_f8 aes;
-};
+} __aligned(64);
 #endif
drivers/crypto/qat/qat_common/qat_algs.c +419 -109

785 lines not on this page · raw message

drivers/crypto/qat/qat_common/qat_crypto.h +13 -2
index fcb3231..d503007 100644
@@ -75,10 +75,21 @@ struct qat_crypto_request_buffs {
 	size_t sz_out;
 };
 
+struct qat_crypto_request;
+
 struct qat_crypto_request {
 	struct icp_qat_fw_la_bulk_req req;
-	struct qat_alg_session_ctx *ctx;
-	struct aead_request *areq;
+	union {
+		struct qat_alg_aead_ctx *aead_ctx;
+		struct qat_alg_ablkcipher_ctx *ablkcipher_ctx;
+	};
+	union {
+		struct aead_request *aead_req;
+		struct ablkcipher_request *ablkcipher_req;
+	};
 	struct qat_crypto_request_buffs buf;
+	void (*cb)(struct icp_qat_fw_la_resp *resp,
+		   struct qat_crypto_request *req);
 };
+
 #endif
#1 lore raw
Quoted 2 lines · Tadeusz Struk

Add support for cbc(aes) ablkcipher.

Hi Herbert,
These two:
[PATCH] crypto: qat - add support for cbc(aes) ablkcipher [PATCH] crypto: qat - Fix assumption that sg in and out will have the...

are generated against cryptodev with these two on top:

[PATCH v2 1/2] crypto: qat - Prevent dma mapping zero length assoc data [PATCH v2 2/2] crypto: qat - Enforce valid numa configuration

Thanks,
Tadeusz