All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver
@ 2016-12-02 14:15 Arek Kusztal
  2016-12-02 14:16 ` [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm Arek Kusztal
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Arek Kusztal @ 2016-12-02 14:15 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
	Arek Kusztal

This patchset adds Data Encryption Standard (DES) capability to Intel QuickAssist
Technology driver and corresponding tests to test files.

Arek Kusztal (3):
  lib/librte_cryptodev: add DES CBC cipher algorithm
  crypto/qat: add DES capability to Intel QAT driver
  app/test: add DES tests to Intel QAT crypto test suite

 app/test/test_cryptodev.c                        |  18 ++++
 app/test/test_cryptodev_blockcipher.c            |   5 ++
 app/test/test_cryptodev_blockcipher.h            |   3 +-
 app/test/test_cryptodev_des_test_vectors.h       | 110 +++++++++++++++++++++++
 doc/guides/cryptodevs/qat.rst                    |   1 +
 doc/guides/rel_notes/release_17_02.rst           |   6 ++
 drivers/crypto/qat/qat_adf/qat_algs.h            |   1 +
 drivers/crypto/qat/qat_adf/qat_algs_build_desc.c |  16 ++++
 drivers/crypto/qat/qat_crypto.c                  |  29 +++++-
 lib/librte_cryptodev/rte_crypto_sym.h            |   4 +
 10 files changed, 191 insertions(+), 2 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm
  2016-12-02 14:15 [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Arek Kusztal
@ 2016-12-02 14:16 ` Arek Kusztal
  2016-12-21 11:49   ` Trahe, Fiona
  2016-12-02 14:16 ` [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver Arek Kusztal
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Arek Kusztal @ 2016-12-02 14:16 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
	Arek Kusztal

This commit adds DES CBC ciper algorithm to available algorithms

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index d694723..0e20b30 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -105,7 +105,11 @@ enum rte_crypto_cipher_algorithm {
 	RTE_CRYPTO_CIPHER_ZUC_EEA3,
 	/**< ZUC algorithm in EEA3 mode */
 
+	RTE_CRYPTO_CIPHER_DES_CBC,
+	/**< DES algorithm in CBC mode */
+
 	RTE_CRYPTO_CIPHER_LIST_END
+
 };
 
 /** Symmetric Cipher Direction */
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver
  2016-12-02 14:15 [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Arek Kusztal
  2016-12-02 14:16 ` [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm Arek Kusztal
@ 2016-12-02 14:16 ` Arek Kusztal
  2016-12-21 11:49   ` Trahe, Fiona
  2016-12-02 14:16 ` [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite Arek Kusztal
  2016-12-21 11:47 ` [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Trahe, Fiona
  3 siblings, 1 reply; 9+ messages in thread
From: Arek Kusztal @ 2016-12-02 14:16 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
	Arek Kusztal

This commit adds DES capability to Intel QuickAssist
Technology Driver

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 doc/guides/cryptodevs/qat.rst                    |  1 +
 doc/guides/rel_notes/release_17_02.rst           |  6 +++++
 drivers/crypto/qat/qat_adf/qat_algs.h            |  1 +
 drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 16 +++++++++++++
 drivers/crypto/qat/qat_crypto.c                  | 29 +++++++++++++++++++++++-
 5 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 607d244..3e97403 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -54,6 +54,7 @@ Cipher algorithms:
 * ``RTE_CRYPTO_CIPHER_AES_GCM``
 * ``RTE_CRYPTO_CIPHER_NULL``
 * ``RTE_CRYPTO_CIPHER_KASUMI_F8``
+* ``RTE_CRYPTO_CIPHER_DES_CBC``
 
 Hash algorithms:
 
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 3b65038..8fd67ab 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -38,6 +38,12 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Updated the QAT PMD.**
+
+  The QAT PMD was updated with additional support for:
+
+  * DES algorithm.
+
 
 Resolved Issues
 ---------------
diff --git a/drivers/crypto/qat/qat_adf/qat_algs.h b/drivers/crypto/qat/qat_adf/qat_algs.h
index dcc0df5..5409e1e 100644
--- a/drivers/crypto/qat/qat_adf/qat_algs.h
+++ b/drivers/crypto/qat/qat_adf/qat_algs.h
@@ -144,4 +144,5 @@ int qat_alg_validate_aes_key(int key_len, enum icp_qat_hw_cipher_algo *alg);
 int qat_alg_validate_snow3g_key(int key_len, enum icp_qat_hw_cipher_algo *alg);
 int qat_alg_validate_kasumi_key(int key_len, enum icp_qat_hw_cipher_algo *alg);
 int qat_alg_validate_3des_key(int key_len, enum icp_qat_hw_cipher_algo *alg);
+int qat_alg_validate_des_key(int key_len, enum icp_qat_hw_cipher_algo *alg);
 #endif
diff --git a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
index f4e24b3..fbeef0a 100644
--- a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
+++ b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
@@ -518,6 +518,10 @@ int qat_alg_aead_session_create_content_desc_cipher(struct qat_session *cdesc,
 		total_key_size = ICP_QAT_HW_3DES_KEY_SZ;
 		cipher_cd_ctrl->cipher_state_sz = ICP_QAT_HW_3DES_BLK_SZ >> 3;
 		proto = ICP_QAT_FW_LA_PROTO_GET(header->serv_specif_flags);
+	} else if (cdesc->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_DES) {
+		total_key_size = ICP_QAT_HW_DES_KEY_SZ;
+		cipher_cd_ctrl->cipher_state_sz = ICP_QAT_HW_DES_BLK_SZ >> 3;
+		proto = ICP_QAT_FW_LA_PROTO_GET(header->serv_specif_flags);
 	} else {
 		total_key_size = cipherkeylen;
 		cipher_cd_ctrl->cipher_state_sz = ICP_QAT_HW_AES_BLK_SZ >> 3;
@@ -858,6 +862,18 @@ int qat_alg_validate_kasumi_key(int key_len, enum icp_qat_hw_cipher_algo *alg)
 	return 0;
 }
 
+int qat_alg_validate_des_key(int key_len, enum icp_qat_hw_cipher_algo *alg)
+{
+	switch (key_len) {
+	case ICP_QAT_HW_DES_KEY_SZ:
+		*alg = ICP_QAT_HW_CIPHER_ALGO_DES;
+		break;
+	default:
+		return -EINVAL;
+	}
+	return 0;
+}
+
 int qat_alg_validate_3des_key(int key_len, enum icp_qat_hw_cipher_algo *alg)
 {
 	switch (key_len) {
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 6a6bd2e..4ee1ef8 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -496,6 +496,26 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
 			}, }
 		}, }
 	},
+	{	/* DES CBC */
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+		{.sym = {
+			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+			{.cipher = {
+				.algo = RTE_CRYPTO_CIPHER_DES_CBC,
+				.block_size = 8,
+				.key_size = {
+					.min = 8,
+					.max = 8,
+					.increment = 0
+				},
+				.iv_size = {
+					.min = 8,
+					.max = 8,
+					.increment = 0
+				}
+			}, }
+		}, }
+	},
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
@@ -637,6 +657,14 @@ qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev,
 		}
 		session->qat_mode = ICP_QAT_HW_CIPHER_CBC_MODE;
 		break;
+	case RTE_CRYPTO_CIPHER_DES_CBC:
+		if (qat_alg_validate_des_key(cipher_xform->key.length,
+				&session->qat_cipher_alg) != 0) {
+			PMD_DRV_LOG(ERR, "Invalid DES cipher key size");
+			goto error_out;
+		}
+		session->qat_mode = ICP_QAT_HW_CIPHER_CBC_MODE;
+		break;
 	case RTE_CRYPTO_CIPHER_3DES_CTR:
 		if (qat_alg_validate_3des_key(cipher_xform->key.length,
 				&session->qat_cipher_alg) != 0) {
@@ -839,7 +867,6 @@ unsigned qat_crypto_sym_get_session_private_size(
 	return RTE_ALIGN_CEIL(sizeof(struct qat_session), 8);
 }
 
-
 uint16_t
 qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
 		uint16_t nb_ops)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite
  2016-12-02 14:15 [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Arek Kusztal
  2016-12-02 14:16 ` [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm Arek Kusztal
  2016-12-02 14:16 ` [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver Arek Kusztal
@ 2016-12-02 14:16 ` Arek Kusztal
  2016-12-21 11:49   ` Trahe, Fiona
  2016-12-21 11:47 ` [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Trahe, Fiona
  3 siblings, 1 reply; 9+ messages in thread
From: Arek Kusztal @ 2016-12-02 14:16 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
	Arek Kusztal

This commit adds tests of Data Encryption Standard (DES)
algorithm to Intel QuickAssist technology crypto test suites

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 app/test/test_cryptodev.c                  |  18 +++++
 app/test/test_cryptodev_blockcipher.c      |   5 ++
 app/test/test_cryptodev_blockcipher.h      |   3 +-
 app/test/test_cryptodev_des_test_vectors.h | 110 +++++++++++++++++++++++++++++
 4 files changed, 135 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 00dced5..23e56ec 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -3829,6 +3829,22 @@ test_3DES_chain_qat_all(void)
 }
 
 static int
+test_DES_cipheronly_qat_all(void)
+{
+	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	int status;
+
+	status = test_blockcipher_all_tests(ts_params->mbuf_pool,
+		ts_params->op_mpool, ts_params->valid_devs[0],
+		RTE_CRYPTODEV_QAT_SYM_PMD,
+		BLKCIPHER_DES_CIPHERONLY_TYPE);
+
+	TEST_ASSERT_EQUAL(status, 0, "Test failed");
+
+	return TEST_SUCCESS;
+}
+
+static int
 test_3DES_cipheronly_qat_all(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
@@ -6053,6 +6069,8 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {
 		TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_qat_all),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 						test_3DES_cipheronly_qat_all),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+						test_DES_cipheronly_qat_all),
 		TEST_CASE_ST(ut_setup, ut_teardown, test_stats),
 
 		/** AES GCM Authenticated Encryption */
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 37b10cf..03dd073 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -489,6 +489,11 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
 		sizeof(triple_des_cipheronly_test_cases[0]);
 		tcs = triple_des_cipheronly_test_cases;
 		break;
+	case BLKCIPHER_DES_CIPHERONLY_TYPE:
+		n_test_cases = sizeof(des_cipheronly_test_cases) /
+		sizeof(des_cipheronly_test_cases[0]);
+		tcs = des_cipheronly_test_cases;
+		break;
 	case BLKCIPHER_AUTHONLY_TYPE:
 		n_test_cases = sizeof(hash_test_cases) /
 		sizeof(hash_test_cases[0]);
diff --git a/app/test/test_cryptodev_blockcipher.h b/app/test/test_cryptodev_blockcipher.h
index 04ff1ee..fe97e4c 100644
--- a/app/test/test_cryptodev_blockcipher.h
+++ b/app/test/test_cryptodev_blockcipher.h
@@ -67,7 +67,8 @@ enum blockcipher_test_type {
 	BLKCIPHER_AES_CIPHERONLY_TYPE,	/* use aes_cipheronly_test_cases[] */
 	BLKCIPHER_3DES_CHAIN_TYPE,	/* use triple_des_chain_test_cases[] */
 	BLKCIPHER_3DES_CIPHERONLY_TYPE,	/* triple_des_cipheronly_test_cases[] */
-	BLKCIPHER_AUTHONLY_TYPE		/* use hash_test_cases[] */
+	BLKCIPHER_AUTHONLY_TYPE,	/* use hash_test_cases[] */
+	BLKCIPHER_DES_CIPHERONLY_TYPE	/* use des_cipheronly_test_cases[] */
 };
 
 struct blockcipher_test_case {
diff --git a/app/test/test_cryptodev_des_test_vectors.h b/app/test/test_cryptodev_des_test_vectors.h
index a1d2d97..388d87e 100644
--- a/app/test/test_cryptodev_des_test_vectors.h
+++ b/app/test/test_cryptodev_des_test_vectors.h
@@ -474,6 +474,75 @@ static const uint8_t ciphertext512_des128cbc[] = {
 	0x43, 0xfe, 0xf1, 0x10, 0x14, 0xf1, 0x91, 0xcc
 };
 
+
+static const uint8_t ciphertext512_des[] = {
+		0x1A, 0x46, 0xDB, 0x69, 0x43, 0x45, 0x0F, 0x2F,
+		0xDC, 0x27, 0xF9, 0x41, 0x0E, 0x01, 0x58, 0xB4,
+		0x5E, 0xCC, 0x13, 0xF5, 0x92, 0x99, 0xE4, 0xF2,
+		0xD5, 0xF9, 0x16, 0xFE, 0x0F, 0x7E, 0xDE, 0xA0,
+		0xF5, 0x32, 0xFE, 0x20, 0x67, 0x93, 0xCA, 0xE1,
+		0x8E, 0x4D, 0x72, 0xA3, 0x50, 0x72, 0x14, 0x15,
+		0x70, 0xE7, 0xAB, 0x49, 0x25, 0x88, 0x0E, 0x01,
+		0x5C, 0x52, 0x87, 0xE2, 0x27, 0xDC, 0xD4, 0xD1,
+		0x14, 0x1B, 0x08, 0x9F, 0x42, 0x48, 0x93, 0xA9,
+		0xD1, 0x2F, 0x2C, 0x69, 0x48, 0x16, 0x59, 0xCF,
+		0x8B, 0xF6, 0x8B, 0xD9, 0x34, 0xD4, 0xD7, 0xE4,
+		0xAE, 0x35, 0xFD, 0xDA, 0x73, 0xBE, 0xDC, 0x6B,
+		0x10, 0x90, 0x75, 0x2D, 0x4C, 0x14, 0x37, 0x8B,
+		0xC8, 0xC7, 0xDF, 0x6E, 0x6F, 0xED, 0xF3, 0xE3,
+		0xD3, 0x21, 0x29, 0xCD, 0x06, 0xB6, 0x5B, 0xF4,
+		0xB9, 0xBD, 0x77, 0xA2, 0xF7, 0x91, 0xF4, 0x95,
+		0xF0, 0xE0, 0x62, 0x03, 0x46, 0xAE, 0x1B, 0xEB,
+		0xE2, 0xA9, 0xCF, 0xB9, 0x0E, 0x3B, 0xB9, 0xDA,
+		0x5C, 0x1B, 0x45, 0x3F, 0xDD, 0xCC, 0xCC, 0xB3,
+		0xF0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 0x38, 0x06, 0x18,
+		0x2E, 0x1D, 0xE1, 0x33, 0x97, 0xB6, 0x7E, 0xAB,
+};
+
+
 static const struct blockcipher_test_data
 triple_des128cbc_test_vector = {
 	.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
@@ -752,6 +821,47 @@ triple_des192cbc_hmac_sha1_test_vector = {
 	}
 };
 
+static const struct blockcipher_test_data
+des_cbc_test_vector = {
+	.crypto_algo = RTE_CRYPTO_CIPHER_DES_CBC,
+	.cipher_key = {
+		.data = {
+			0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2
+		},
+		.len = 8
+	},
+	.iv = {
+		.data = {
+			0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+		},
+		.len = 8
+	},
+	.plaintext = {
+		.data = plaintext_des,
+		.len = 512
+	},
+	.ciphertext = {
+		.data = ciphertext512_des,
+		.len = 512
+	},
+};
+
+static const struct blockcipher_test_case des_cipheronly_test_cases[] = {
+	{
+		.test_descr = "DES-CBC Encryption",
+		.test_data = &des_cbc_test_vector,
+		.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+	},
+	{
+		.test_descr = "DES-CBC Decryption",
+		.test_data = &des_cbc_test_vector,
+		.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+	},
+
+};
+
 static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
 	{
 		.test_descr = "3DES-128-CBC HMAC-SHA1 Encryption Digest",
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver
  2016-12-02 14:15 [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Arek Kusztal
                   ` (2 preceding siblings ...)
  2016-12-02 14:16 ` [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite Arek Kusztal
@ 2016-12-21 11:47 ` Trahe, Fiona
  2016-12-21 23:02   ` De Lara Guarch, Pablo
  3 siblings, 1 reply; 9+ messages in thread
From: Trahe, Fiona @ 2016-12-21 11:47 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: De Lara Guarch, Pablo, Griffin, John, Jain, Deepak K



> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 2, 2016 2:16 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver
> 
> This patchset adds Data Encryption Standard (DES) capability to Intel
> QuickAssist
> Technology driver and corresponding tests to test files.
> 
> Arek Kusztal (3):
>   lib/librte_cryptodev: add DES CBC cipher algorithm
>   crypto/qat: add DES capability to Intel QAT driver
>   app/test: add DES tests to Intel QAT crypto test suite
> 
>  app/test/test_cryptodev.c                        |  18 ++++
>  app/test/test_cryptodev_blockcipher.c            |   5 ++
>  app/test/test_cryptodev_blockcipher.h            |   3 +-
>  app/test/test_cryptodev_des_test_vectors.h       | 110
> +++++++++++++++++++++++
>  doc/guides/cryptodevs/qat.rst                    |   1 +
>  doc/guides/rel_notes/release_17_02.rst           |   6 ++
>  drivers/crypto/qat/qat_adf/qat_algs.h            |   1 +
>  drivers/crypto/qat/qat_adf/qat_algs_build_desc.c |  16 ++++
>  drivers/crypto/qat/qat_crypto.c                  |  29 +++++-
>  lib/librte_cryptodev/rte_crypto_sym.h            |   4 +
>  10 files changed, 191 insertions(+), 2 deletions(-)
> 
> --
> 2.1.0
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver
  2016-12-02 14:16 ` [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver Arek Kusztal
@ 2016-12-21 11:49   ` Trahe, Fiona
  0 siblings, 0 replies; 9+ messages in thread
From: Trahe, Fiona @ 2016-12-21 11:49 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: De Lara Guarch, Pablo, Griffin, John, Jain, Deepak K



> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 2, 2016 2:16 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver
> 
> This commit adds DES capability to Intel QuickAssist
> Technology Driver
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite
  2016-12-02 14:16 ` [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite Arek Kusztal
@ 2016-12-21 11:49   ` Trahe, Fiona
  0 siblings, 0 replies; 9+ messages in thread
From: Trahe, Fiona @ 2016-12-21 11:49 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: De Lara Guarch, Pablo, Griffin, John, Jain, Deepak K



> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 2, 2016 2:16 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite
> 
> This commit adds tests of Data Encryption Standard (DES)
> algorithm to Intel QuickAssist technology crypto test suites
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm
  2016-12-02 14:16 ` [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm Arek Kusztal
@ 2016-12-21 11:49   ` Trahe, Fiona
  0 siblings, 0 replies; 9+ messages in thread
From: Trahe, Fiona @ 2016-12-21 11:49 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: De Lara Guarch, Pablo, Griffin, John, Jain, Deepak K



> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 2, 2016 2:16 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm
> 
> This commit adds DES CBC ciper algorithm to available algorithms
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver
  2016-12-21 11:47 ` [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Trahe, Fiona
@ 2016-12-21 23:02   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 9+ messages in thread
From: De Lara Guarch, Pablo @ 2016-12-21 23:02 UTC (permalink / raw)
  To: Trahe, Fiona, Kusztal, ArkadiuszX, dev; +Cc: Griffin, John, Jain, Deepak K



> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, December 21, 2016 11:48 AM
> To: Kusztal, ArkadiuszX; dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K
> Subject: RE: [PATCH 0/3] Add DES capability to Intel QuickAssist Technology
> driver
> 
> 
> 
> > -----Original Message-----
> > From: Kusztal, ArkadiuszX
> > Sent: Friday, December 2, 2016 2:16 PM
> > To: dev@dpdk.org
> > Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> > Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> > <arkadiuszx.kusztal@intel.com>
> > Subject: [PATCH 0/3] Add DES capability to Intel QuickAssist Technology
> driver
> >
> > This patchset adds Data Encryption Standard (DES) capability to Intel
> > QuickAssist
> > Technology driver and corresponding tests to test files.
> >
> > Arek Kusztal (3):
> >   lib/librte_cryptodev: add DES CBC cipher algorithm
> >   crypto/qat: add DES capability to Intel QAT driver
> >   app/test: add DES tests to Intel QAT crypto test suite
> >
> >  app/test/test_cryptodev.c                        |  18 ++++
> >  app/test/test_cryptodev_blockcipher.c            |   5 ++
> >  app/test/test_cryptodev_blockcipher.h            |   3 +-
> >  app/test/test_cryptodev_des_test_vectors.h       | 110
> > +++++++++++++++++++++++
> >  doc/guides/cryptodevs/qat.rst                    |   1 +
> >  doc/guides/rel_notes/release_17_02.rst           |   6 ++
> >  drivers/crypto/qat/qat_adf/qat_algs.h            |   1 +
> >  drivers/crypto/qat/qat_adf/qat_algs_build_desc.c |  16 ++++
> >  drivers/crypto/qat/qat_crypto.c                  |  29 +++++-
> >  lib/librte_cryptodev/rte_crypto_sym.h            |   4 +
> >  10 files changed, 191 insertions(+), 2 deletions(-)
> >
> > --
> > 2.1.0
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-21 23:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 14:15 [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Arek Kusztal
2016-12-02 14:16 ` [PATCH 1/3] lib/librte_cryptodev: add DES CBC cipher algorithm Arek Kusztal
2016-12-21 11:49   ` Trahe, Fiona
2016-12-02 14:16 ` [PATCH 2/3] crypto/qat: add DES capability to Intel QAT driver Arek Kusztal
2016-12-21 11:49   ` Trahe, Fiona
2016-12-02 14:16 ` [PATCH 3/3] app/test: add DES tests to Intel QAT crypto test suite Arek Kusztal
2016-12-21 11:49   ` Trahe, Fiona
2016-12-21 11:47 ` [PATCH 0/3] Add DES capability to Intel QuickAssist Technology driver Trahe, Fiona
2016-12-21 23:02   ` De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.