patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3
@ 2020-07-29 14:22 Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 2/4] test/crypto: add mixed encypted-digest Adam Dybkowski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Adam Dybkowski @ 2020-07-29 14:22 UTC (permalink / raw)
  To: stable, fiona.trahe, luca.boccassi; +Cc: Adam Dybkowski

[ upstream commit bcd7e3e8e6e18ce94c8aa02b949fc0274bd1faeb ]

This patch implements handling mixed encrypted digest hash-cipher
requests (e.g. SNOW3G + ZUC or ZUC + AES CTR) possible when running
on GEN3 QAT. Such algorithm combinations are not supported on
GEN1/GEN2 hardware.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 doc/guides/cryptodevs/qat.rst              | 24 ++++++++
 drivers/common/qat/qat_adf/icp_qat_fw.h    |  3 +
 drivers/common/qat/qat_adf/icp_qat_fw_la.h |  2 +
 drivers/crypto/qat/qat_sym_session.c       | 72 ++++++++++++++++++++++
 4 files changed, 101 insertions(+)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 6197875fe..9053ae9c0 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -72,6 +72,30 @@ Supported AEAD algorithms:
 * ``RTE_CRYPTO_AEAD_AES_CCM``
 
 
+Supported Chains
+~~~~~~~~~~~~~~~~
+
+All the usual chains are supported and also some mixed chains:
+
+.. table:: Supported hash-cipher chains for wireless digest-encrypted cases
+
+   +------------------+-----------+-------------+----------+----------+
+   | Cipher algorithm | NULL AUTH | SNOW3G UIA2 | ZUC EIA3 | AES CMAC |
+   +==================+===========+=============+==========+==========+
+   | NULL CIPHER      | Y         | 3           | 3        | Y        |
+   +------------------+-----------+-------------+----------+----------+
+   | SNOW3G UEA2      | 3         | Y           | 3        | 3        |
+   +------------------+-----------+-------------+----------+----------+
+   | ZUC EEA3         | 3         | 3           | 2&3      | 3        |
+   +------------------+-----------+-------------+----------+----------+
+   | AES CTR          | Y         | 3           | 3        | Y        |
+   +------------------+-----------+-------------+----------+----------+
+
+* The combinations marked as "Y" are supported on all QAT hardware versions.
+* The combinations marked as "2&3" are supported on GEN2/GEN3 QAT hardware only.
+* The combinations marked as "3" are supported on GEN3 QAT hardware only.
+
+
 Limitations
 ~~~~~~~~~~~
 
diff --git a/drivers/common/qat/qat_adf/icp_qat_fw.h b/drivers/common/qat/qat_adf/icp_qat_fw.h
index 8f7cb37b4..1265c2a13 100644
--- a/drivers/common/qat/qat_adf/icp_qat_fw.h
+++ b/drivers/common/qat/qat_adf/icp_qat_fw.h
@@ -175,6 +175,9 @@ struct icp_qat_fw_comn_resp {
 #define QAT_COMN_PTR_TYPE_SGL 0x1
 #define QAT_COMN_CD_FLD_TYPE_64BIT_ADR 0x0
 #define QAT_COMN_CD_FLD_TYPE_16BYTE_DATA 0x1
+#define QAT_COMN_EXT_FLAGS_BITPOS 8
+#define QAT_COMN_EXT_FLAGS_MASK 0x1
+#define QAT_COMN_EXT_FLAGS_USED 0x1
 
 #define ICP_QAT_FW_COMN_FLAGS_BUILD(cdt, ptr) \
 	((((cdt) & QAT_COMN_CD_FLD_TYPE_MASK) << QAT_COMN_CD_FLD_TYPE_BITPOS) \
diff --git a/drivers/common/qat/qat_adf/icp_qat_fw_la.h b/drivers/common/qat/qat_adf/icp_qat_fw_la.h
index 38891eb1f..20eb145de 100644
--- a/drivers/common/qat/qat_adf/icp_qat_fw_la.h
+++ b/drivers/common/qat/qat_adf/icp_qat_fw_la.h
@@ -273,6 +273,8 @@ struct icp_qat_fw_cipher_auth_cd_ctrl_hdr {
 
 #define ICP_QAT_FW_AUTH_HDR_FLAG_DO_NESTED 1
 #define ICP_QAT_FW_AUTH_HDR_FLAG_NO_NESTED 0
+#define ICP_QAT_FW_AUTH_HDR_FLAG_SNOW3G_UIA2_BITPOS 3
+#define ICP_QAT_FW_AUTH_HDR_FLAG_ZUC_EIA3_BITPOS 4
 #define ICP_QAT_FW_CCM_GCM_AAD_SZ_MAX	240
 #define ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET 24
 #define ICP_QAT_FW_CIPHER_REQUEST_PARAMETERS_OFFSET (0)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 72290ba48..4359f2f0b 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -416,6 +416,74 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
 	return 0;
 }
 
+static void
+qat_sym_session_set_ext_hash_flags(struct qat_sym_session *session,
+		uint8_t hash_flag)
+{
+	struct icp_qat_fw_comn_req_hdr *header = &session->fw_req.comn_hdr;
+	struct icp_qat_fw_cipher_auth_cd_ctrl_hdr *cd_ctrl =
+			(struct icp_qat_fw_cipher_auth_cd_ctrl_hdr *)
+			session->fw_req.cd_ctrl.content_desc_ctrl_lw;
+
+	/* Set the Use Extended Protocol Flags bit in LW 1 */
+	QAT_FIELD_SET(header->comn_req_flags,
+			QAT_COMN_EXT_FLAGS_USED,
+			QAT_COMN_EXT_FLAGS_BITPOS,
+			QAT_COMN_EXT_FLAGS_MASK);
+
+	/* Set Hash Flags in LW 28 */
+	cd_ctrl->hash_flags |= hash_flag;
+
+	/* Set proto flags in LW 1 */
+	switch (session->qat_cipher_alg) {
+	case ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2:
+		ICP_QAT_FW_LA_PROTO_SET(header->serv_specif_flags,
+				ICP_QAT_FW_LA_SNOW_3G_PROTO);
+		ICP_QAT_FW_LA_ZUC_3G_PROTO_FLAG_SET(
+				header->serv_specif_flags, 0);
+		break;
+	case ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3:
+		ICP_QAT_FW_LA_PROTO_SET(header->serv_specif_flags,
+				ICP_QAT_FW_LA_NO_PROTO);
+		ICP_QAT_FW_LA_ZUC_3G_PROTO_FLAG_SET(
+				header->serv_specif_flags,
+				ICP_QAT_FW_LA_ZUC_3G_PROTO);
+		break;
+	default:
+		ICP_QAT_FW_LA_PROTO_SET(header->serv_specif_flags,
+				ICP_QAT_FW_LA_NO_PROTO);
+		ICP_QAT_FW_LA_ZUC_3G_PROTO_FLAG_SET(
+				header->serv_specif_flags, 0);
+		break;
+	}
+}
+
+static void
+qat_sym_session_handle_mixed(struct qat_sym_session *session)
+{
+	if (session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 &&
+			session->qat_cipher_alg !=
+			ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3) {
+		session->min_qat_dev_gen = QAT_GEN3;
+		qat_sym_session_set_ext_hash_flags(session,
+			1 << ICP_QAT_FW_AUTH_HDR_FLAG_ZUC_EIA3_BITPOS);
+	} else if (session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2 &&
+			session->qat_cipher_alg !=
+			ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2) {
+		session->min_qat_dev_gen = QAT_GEN3;
+		qat_sym_session_set_ext_hash_flags(session,
+			1 << ICP_QAT_FW_AUTH_HDR_FLAG_SNOW3G_UIA2_BITPOS);
+	} else if ((session->aes_cmac ||
+			session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) &&
+			(session->qat_cipher_alg ==
+			ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2 ||
+			session->qat_cipher_alg ==
+			ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3)) {
+		session->min_qat_dev_gen = QAT_GEN3;
+		qat_sym_session_set_ext_hash_flags(session, 0);
+	}
+}
+
 int
 qat_sym_session_set_parameters(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform, void *session_private)
@@ -463,6 +531,8 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev,
 					xform, session);
 			if (ret < 0)
 				return ret;
+			/* Special handling of mixed hash+cipher algorithms */
+			qat_sym_session_handle_mixed(session);
 		}
 		break;
 	case ICP_QAT_FW_LA_CMD_HASH_CIPHER:
@@ -480,6 +550,8 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev,
 					xform, session);
 			if (ret < 0)
 				return ret;
+			/* Special handling of mixed hash+cipher algorithms */
+			qat_sym_session_handle_mixed(session);
 		}
 		break;
 	case ICP_QAT_FW_LA_CMD_TRNG_GET_RANDOM:
-- 
2.25.1


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

* [dpdk-stable] [PATCH 19.11 2/4] test/crypto: add mixed encypted-digest
  2020-07-29 14:22 [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Adam Dybkowski
@ 2020-07-29 14:22 ` Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 3/4] common/qat: get firmware version Adam Dybkowski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Adam Dybkowski @ 2020-07-29 14:22 UTC (permalink / raw)
  To: stable, fiona.trahe, luca.boccassi; +Cc: Adam Dybkowski

[ upstream commit c6c267a00a9227d7e8ade7338ad1ddb10fbefcf8 ]

This patch adds unit tests for QAT PMD for mixed encrypted-digest
cases, involving SNOW3G UIA2, ZUC EIA3, AES CMAC and NULL auth
algorithms together with SNOW3G UEA2, ZUC EEA3, AES CTR and NULL
cipher algorithms in various combinations.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 app/test/test_cryptodev.c                    |  400 +++++-
 app/test/test_cryptodev_mixed_test_vectors.h | 1320 +++++++++++++++++-
 2 files changed, 1676 insertions(+), 44 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 79ced809d..fa044cb71 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2701,13 +2701,15 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->cipher_xform,
 			ts_params->session_priv_mpool);
+	if (status == -ENOTSUP)
+		return status;
 
 	TEST_ASSERT_EQUAL(status, 0, "session init failed");
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 	return 0;
 }
 
@@ -2827,6 +2829,7 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
 		ut_params->auth_xform.next = NULL;
@@ -2840,8 +2843,10 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
 				&ut_params->auth_xform,
 				ts_params->session_priv_mpool);
 
+	if (status == -ENOTSUP)
+		return status;
+
 	TEST_ASSERT_EQUAL(status, 0, "session init failed");
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	return 0;
 }
@@ -2985,6 +2990,11 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
 
+	enum rte_crypto_cipher_algorithm cipher_algo =
+			ut_params->cipher_xform.cipher.algo;
+	enum rte_crypto_auth_algorithm auth_algo =
+			ut_params->auth_xform.auth.algo;
+
 	/* Generate Crypto op data structure */
 	ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -3005,8 +3015,22 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
 	TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
 			"no room to append auth tag");
 	ut_params->digest = sym_op->auth.digest.data;
-	sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
-			ut_params->ibuf, data_pad_len);
+
+	if (rte_pktmbuf_is_contiguous(ut_params->ibuf)) {
+		sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
+				ut_params->ibuf, data_pad_len);
+	} else {
+		struct rte_mbuf *m = ut_params->ibuf;
+		unsigned int offset = data_pad_len;
+
+		while (offset > m->data_len && m->next != NULL) {
+			offset -= m->data_len;
+			m = m->next;
+		}
+		sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
+			m, offset);
+	}
+
 	if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
 		memset(sym_op->auth.digest.data, 0, auth_tag_len);
 	else
@@ -3023,10 +3047,25 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
 	iv_ptr += cipher_iv_len;
 	rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
 
-	sym_op->cipher.data.length = cipher_len;
-	sym_op->cipher.data.offset = cipher_offset;
-	sym_op->auth.data.length = auth_len;
-	sym_op->auth.data.offset = auth_offset;
+	if (cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||
+		cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8 ||
+		cipher_algo == RTE_CRYPTO_CIPHER_ZUC_EEA3) {
+		sym_op->cipher.data.length = cipher_len;
+		sym_op->cipher.data.offset = cipher_offset;
+	} else {
+		sym_op->cipher.data.length = cipher_len >> 3;
+		sym_op->cipher.data.offset = cipher_offset >> 3;
+	}
+
+	if (auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 ||
+		auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9 ||
+		auth_algo == RTE_CRYPTO_AUTH_ZUC_EIA3) {
+		sym_op->auth.data.length = auth_len;
+		sym_op->auth.data.offset = auth_offset;
+	} else {
+		sym_op->auth.data.length = auth_len >> 3;
+		sym_op->auth.data.offset = auth_offset >> 3;
+	}
 
 	return 0;
 }
@@ -6595,8 +6634,9 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 	unsigned int ciphertext_len;
 
 	struct rte_cryptodev_info dev_info;
+	struct rte_crypto_op *op;
 
-	/* Check if device supports particular algorithms */
+	/* Check if device supports particular algorithms separately */
 	if (test_mixed_check_if_unsupported(tdata))
 		return -ENOTSUP;
 
@@ -6612,18 +6652,26 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 	}
 
 	/* Create the session */
-	retval = create_wireless_algo_auth_cipher_session(
-			ts_params->valid_devs[0],
-			(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT
-					: RTE_CRYPTO_CIPHER_OP_ENCRYPT),
-			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
-					: RTE_CRYPTO_AUTH_OP_GENERATE),
-			tdata->auth_algo,
-			tdata->cipher_algo,
-			tdata->auth_key.data, tdata->auth_key.len,
-			tdata->auth_iv.len, tdata->digest_enc.len,
-			tdata->cipher_iv.len);
-
+	if (verify)
+		retval = create_wireless_algo_cipher_auth_session(
+				ts_params->valid_devs[0],
+				RTE_CRYPTO_CIPHER_OP_DECRYPT,
+				RTE_CRYPTO_AUTH_OP_VERIFY,
+				tdata->auth_algo,
+				tdata->cipher_algo,
+				tdata->auth_key.data, tdata->auth_key.len,
+				tdata->auth_iv.len, tdata->digest_enc.len,
+				tdata->cipher_iv.len);
+	else
+		retval = create_wireless_algo_auth_cipher_session(
+				ts_params->valid_devs[0],
+				RTE_CRYPTO_CIPHER_OP_ENCRYPT,
+				RTE_CRYPTO_AUTH_OP_GENERATE,
+				tdata->auth_algo,
+				tdata->cipher_algo,
+				tdata->auth_key.data, tdata->auth_key.len,
+				tdata->auth_iv.len, tdata->digest_enc.len,
+				tdata->cipher_iv.len);
 	if (retval < 0)
 		return retval;
 
@@ -6666,7 +6714,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 			tdata->cipher_iv.data, tdata->cipher_iv.len,
 			tdata->auth_iv.data, tdata->auth_iv.len,
 			(tdata->digest_enc.offset == 0 ?
-			(verify ? ciphertext_pad_len : plaintext_pad_len)
+				plaintext_pad_len
 				: tdata->digest_enc.offset),
 			tdata->validCipherLen.len_bits,
 			tdata->cipher.offset_bits,
@@ -6677,9 +6725,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 	if (retval < 0)
 		return retval;
 
-	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+	op = process_crypto_request(ts_params->valid_devs[0],
 			ut_params->op);
 
+	/* Check if the op failed because the device doesn't */
+	/* support this particular combination of algorithms */
+	if (op == NULL && ut_params->op->status ==
+			RTE_CRYPTO_OP_STATUS_INVALID_SESSION) {
+		printf("Device doesn't support this mixed combination. "
+				"Test Skipped.\n");
+		return -ENOTSUP;
+	}
+	ut_params->op = op;
+
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
 
 	ut_params->obuf = (op_mode == IN_PLACE ?
@@ -6694,12 +6752,10 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 					(tdata->cipher.offset_bits >> 3);
 
 		debug_hexdump(stdout, "plaintext:", plaintext,
-				(tdata->plaintext.len_bits >> 3) -
-				tdata->digest_enc.len);
+				tdata->plaintext.len_bits >> 3);
 		debug_hexdump(stdout, "plaintext expected:",
 				tdata->plaintext.data,
-				(tdata->plaintext.len_bits >> 3) -
-				tdata->digest_enc.len);
+				tdata->plaintext.len_bits >> 3);
 	} else {
 		if (ut_params->obuf)
 			ciphertext = rte_pktmbuf_mtod(ut_params->obuf,
@@ -6744,6 +6800,10 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 				DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
 				"Generated auth tag not as expected");
 	}
+
+	TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+			"crypto op processing failed");
+
 	return 0;
 }
 
@@ -6767,6 +6827,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 	uint8_t digest_buffer[10000];
 
 	struct rte_cryptodev_info dev_info;
+	struct rte_crypto_op *op;
 
 	/* Check if device supports particular algorithms */
 	if (test_mixed_check_if_unsupported(tdata))
@@ -6795,18 +6856,26 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 	}
 
 	/* Create the session */
-	retval = create_wireless_algo_auth_cipher_session(
-			ts_params->valid_devs[0],
-			(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT
-					: RTE_CRYPTO_CIPHER_OP_ENCRYPT),
-			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
-					: RTE_CRYPTO_AUTH_OP_GENERATE),
-			tdata->auth_algo,
-			tdata->cipher_algo,
-			tdata->auth_key.data, tdata->auth_key.len,
-			tdata->auth_iv.len, tdata->digest_enc.len,
-			tdata->cipher_iv.len);
-
+	if (verify)
+		retval = create_wireless_algo_cipher_auth_session(
+				ts_params->valid_devs[0],
+				RTE_CRYPTO_CIPHER_OP_DECRYPT,
+				RTE_CRYPTO_AUTH_OP_VERIFY,
+				tdata->auth_algo,
+				tdata->cipher_algo,
+				tdata->auth_key.data, tdata->auth_key.len,
+				tdata->auth_iv.len, tdata->digest_enc.len,
+				tdata->cipher_iv.len);
+	else
+		retval = create_wireless_algo_auth_cipher_session(
+				ts_params->valid_devs[0],
+				RTE_CRYPTO_CIPHER_OP_ENCRYPT,
+				RTE_CRYPTO_AUTH_OP_GENERATE,
+				tdata->auth_algo,
+				tdata->cipher_algo,
+				tdata->auth_key.data, tdata->auth_key.len,
+				tdata->auth_iv.len, tdata->digest_enc.len,
+				tdata->cipher_iv.len);
 	if (retval < 0)
 		return retval;
 
@@ -6816,7 +6885,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 	plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);
 
 	ut_params->ibuf = create_segmented_mbuf(ts_params->mbuf_pool,
-			plaintext_pad_len, 15, 0);
+			ciphertext_pad_len, 15, 0);
 	TEST_ASSERT_NOT_NULL(ut_params->ibuf,
 			"Failed to allocate input buffer in mempool");
 
@@ -6850,7 +6919,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 			tdata->cipher_iv.data, tdata->cipher_iv.len,
 			tdata->auth_iv.data, tdata->auth_iv.len,
 			(tdata->digest_enc.offset == 0 ?
-			(verify ? ciphertext_pad_len : plaintext_pad_len)
+				plaintext_pad_len
 				: tdata->digest_enc.offset),
 			tdata->validCipherLen.len_bits,
 			tdata->cipher.offset_bits,
@@ -6861,9 +6930,20 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 	if (retval < 0)
 		return retval;
 
-	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+	op = process_crypto_request(ts_params->valid_devs[0],
 			ut_params->op);
 
+	/* Check if the op failed because the device doesn't */
+	/* support this particular combination of algorithms */
+	if (op == NULL && ut_params->op->status ==
+			RTE_CRYPTO_OP_STATUS_INVALID_SESSION) {
+		printf("Device doesn't support this mixed combination. "
+				"Test Skipped.\n");
+		return -ENOTSUP;
+	}
+
+	ut_params->op = op;
+
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
 
 	ut_params->obuf = (op_mode == IN_PLACE ?
@@ -6936,6 +7016,10 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 				tdata->digest_enc.len,
 				"Generated auth tag not as expected");
 	}
+
+	TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+			"crypto op processing failed");
+
 	return 0;
 }
 
@@ -6997,6 +7081,176 @@ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl(void)
 		&auth_aes_cmac_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
 }
 
+/** MIXED AUTH + CIPHER */
+
+static int
+test_auth_zuc_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_snow_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_zuc_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_snow_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_aes_cmac_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_snow_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_aes_cmac_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_snow_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_zuc_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_zuc_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_snow_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_snow_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_snow_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_zuc_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_snow_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_zuc_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_aes_cmac_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_zuc_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_aes_cmac_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_zuc_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_null_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_snow_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_null_cipher_snow_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_snow_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_null_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_zuc_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_null_cipher_zuc_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_zuc_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_snow_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_null_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_snow_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_snow_cipher_null_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_zuc_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_null_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_zuc_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_zuc_cipher_null_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_null_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_null_cipher_aes_ctr_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_null_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
+}
+
+static int
+test_auth_aes_cmac_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_null_test_case_1, OUT_OF_PLACE, 0);
+}
+
+static int
+test_verify_auth_aes_cmac_cipher_null_test_case_1(void)
+{
+	return test_mixed_auth_cipher(
+		&auth_aes_cmac_cipher_null_test_case_1, OUT_OF_PLACE, 1);
+}
+
 static int
 test_3DES_chain_qat_all(void)
 {
@@ -12296,6 +12550,68 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {
 		TEST_CASE_ST(ut_setup, ut_teardown,
 		   test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl),
 
+		/** AUTH ZUC + CIPHER SNOW3G */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_zuc_cipher_snow_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_zuc_cipher_snow_test_case_1),
+		/** AUTH AES CMAC + CIPHER SNOW3G */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_aes_cmac_cipher_snow_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_aes_cmac_cipher_snow_test_case_1),
+		/** AUTH ZUC + CIPHER AES CTR */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_zuc_cipher_aes_ctr_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_zuc_cipher_aes_ctr_test_case_1),
+		/** AUTH SNOW3G + CIPHER AES CTR */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_snow_cipher_aes_ctr_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_snow_cipher_aes_ctr_test_case_1),
+		/** AUTH SNOW3G + CIPHER ZUC */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_snow_cipher_zuc_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_snow_cipher_zuc_test_case_1),
+		/** AUTH AES CMAC + CIPHER ZUC */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_aes_cmac_cipher_zuc_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_aes_cmac_cipher_zuc_test_case_1),
+
+		/** AUTH NULL + CIPHER SNOW3G */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_null_cipher_snow_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_null_cipher_snow_test_case_1),
+		/** AUTH NULL + CIPHER ZUC */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_null_cipher_zuc_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_null_cipher_zuc_test_case_1),
+		/** AUTH SNOW3G + CIPHER NULL */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_snow_cipher_null_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_snow_cipher_null_test_case_1),
+		/** AUTH ZUC + CIPHER NULL */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_zuc_cipher_null_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_zuc_cipher_null_test_case_1),
+		/** AUTH NULL + CIPHER AES CTR */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_null_cipher_aes_ctr_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_null_cipher_aes_ctr_test_case_1),
+		/** AUTH AES CMAC + CIPHER NULL */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_auth_aes_cmac_cipher_null_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_verify_auth_aes_cmac_cipher_null_test_case_1),
+
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
diff --git a/app/test/test_cryptodev_mixed_test_vectors.h b/app/test/test_cryptodev_mixed_test_vectors.h
index bca47c05c..f50dcb045 100644
--- a/app/test/test_cryptodev_mixed_test_vectors.h
+++ b/app/test/test_cryptodev_mixed_test_vectors.h
@@ -126,9 +126,9 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_1 = {
 			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
 			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
 			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
-			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A
 		},
-		.len_bits = 128 << 3,
+		.len_bits = 124 << 3,
 	},
 	.ciphertext = {
 		.data = {
@@ -169,4 +169,1320 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_1 = {
 	}
 };
 
+struct mixed_cipher_auth_test_data auth_zuc_cipher_snow_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
+	.auth_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 73 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
+	.cipher_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 77 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
+			0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
+			0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
+			0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
+			0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
+			0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
+			0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
+			0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
+			0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
+			0x00
+		},
+		.len_bits = 73 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x18, 0x46, 0xE1, 0xC5, 0x2C, 0x85, 0x93, 0x22,
+			0x84, 0x80, 0xD6, 0x84, 0x5C, 0x99, 0x55, 0xE0,
+			0xD5, 0x02, 0x41, 0x74, 0x4A, 0xD2, 0x8E, 0x7E,
+			0xB9, 0x79, 0xD3, 0xE5, 0x76, 0x75, 0xD5, 0x59,
+			0x26, 0xD7, 0x06, 0x2D, 0xF4, 0x71, 0x26, 0x40,
+			0xAC, 0x77, 0x62, 0xAC, 0x35, 0x0D, 0xC5, 0x35,
+			0xF8, 0x03, 0x54, 0x52, 0x2E, 0xCA, 0x14, 0xD8,
+			0x2E, 0x6C, 0x0E, 0x7A, 0x09, 0xE7, 0x20, 0xDD,
+			0x7C, 0xE3, 0x28, 0x77, 0x53, 0x65, 0xBA, 0x54,
+			0xE8, 0x25, 0x04, 0x52, 0xFD
+		},
+		.len_bits = 77 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x25, 0x04, 0x52, 0xFD
+		},
+		.len = 4,
+		.offset = 73,
+	},
+	.validDataLen = {
+		.len_bits = 77 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 77 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 73 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_snow_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
+	.auth_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.auth = {
+		.len_bits = 512 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
+	.cipher_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.cipher = {
+		.len_bits = 516 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
+			0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72,
+			0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77,
+			0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20,
+			0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20,
+			0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73,
+			0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74,
+			0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65,
+			0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65,
+			0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68,
+			0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70,
+			0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75,
+			0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72,
+			0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D,
+			0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65,
+			0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73,
+			0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C,
+			0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E,
+			0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
+			0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E,
+			0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20,
+			0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20,
+			0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69,
+			0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65,
+			0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69,
+			0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73,
+			0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61,
+			0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64,
+			0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61,
+			0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C,
+			0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67,
+			0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72,
+			0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68,
+			0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66,
+			0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62,
+			0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61,
+			0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65,
+			0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F,
+			0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64,
+			0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C,
+			0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74,
+			0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69,
+			0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77,
+			0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65,
+			0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75,
+			0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E,
+			0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F,
+			0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63,
+			0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68,
+			0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C,
+			0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73,
+			0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74,
+			0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20,
+			0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73,
+			0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F,
+			0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75
+		},
+		.len_bits = 512 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x8A, 0xA9, 0x74, 0x31, 0xB1, 0xF2, 0xAB, 0x00,
+			0xD6, 0x3D, 0xFA, 0xBD, 0xD9, 0x65, 0x52, 0x80,
+			0xB5, 0x98, 0x20, 0xFF, 0x8D, 0x1C, 0x0F, 0x53,
+			0xDD, 0x79, 0xCC, 0x9D, 0x7A, 0x6D, 0x76, 0x06,
+			0xB6, 0xF4, 0xAC, 0xDA, 0xF2, 0x24, 0x02, 0x58,
+			0x5F, 0xE3, 0xD4, 0xF7, 0x0B, 0x3B, 0x1C, 0x4C,
+			0x0B, 0x4C, 0xC7, 0x4D, 0x3D, 0xFA, 0x28, 0xD9,
+			0xA0, 0x90, 0x3E, 0x91, 0xDC, 0xC4, 0xE1, 0x2E,
+			0x7C, 0xB4, 0xBD, 0xE0, 0x9E, 0xC8, 0x33, 0x42,
+			0x0E, 0x84, 0xEF, 0x3C, 0xF1, 0x8B, 0x2C, 0xBD,
+			0x33, 0x70, 0x22, 0xBA, 0xD4, 0x0B, 0xB2, 0x83,
+			0x7F, 0x27, 0x51, 0x92, 0xD1, 0x40, 0x1E, 0xCD,
+			0x62, 0x0F, 0x61, 0x5F, 0xB4, 0xB1, 0x0D, 0x1A,
+			0x16, 0x1B, 0xE8, 0xA8, 0x2B, 0x45, 0xBA, 0x56,
+			0x30, 0xD0, 0xE3, 0xCA, 0x4D, 0x23, 0xA3, 0x38,
+			0xD6, 0x2C, 0xE4, 0x8D, 0xFF, 0x23, 0x97, 0x9E,
+			0xE9, 0xBD, 0x70, 0xAF, 0x6B, 0x68, 0xA7, 0x21,
+			0x3C, 0xFB, 0xB2, 0x99, 0x4D, 0xE9, 0x70, 0x56,
+			0x36, 0xB8, 0xD7, 0xE0, 0xEB, 0x62, 0xA1, 0x79,
+			0xF9, 0xD6, 0xAD, 0x83, 0x75, 0x54, 0xF5, 0x45,
+			0x82, 0xE8, 0xD6, 0xA9, 0x76, 0x11, 0xC7, 0x81,
+			0x2C, 0xBA, 0x67, 0xB5, 0xDB, 0xE5, 0xF2, 0x6B,
+			0x7D, 0x9F, 0x4E, 0xDC, 0xA1, 0x62, 0xF1, 0xF0,
+			0xAD, 0xD4, 0x7A, 0xA3, 0xF3, 0x76, 0x29, 0xA4,
+			0xB7, 0xF3, 0x31, 0x84, 0xE7, 0x1F, 0x0D, 0x01,
+			0xBD, 0x46, 0x07, 0x51, 0x05, 0x76, 0xE2, 0x95,
+			0xF8, 0x48, 0x18, 0x8A, 0x1E, 0x92, 0x8B, 0xBC,
+			0x30, 0x05, 0xF5, 0xD6, 0x96, 0xEF, 0x78, 0xB6,
+			0xF3, 0xEC, 0x4C, 0xB1, 0x88, 0x8B, 0x63, 0x40,
+			0x07, 0x37, 0xB4, 0x1A, 0xBD, 0xE9, 0x38, 0xB4,
+			0x31, 0x35, 0x9D, 0x0C, 0xF1, 0x24, 0x0E, 0xD2,
+			0xAE, 0x39, 0xA6, 0x41, 0x3C, 0x91, 0x6A, 0x4B,
+			0xEC, 0x46, 0x76, 0xB4, 0x15, 0xC3, 0x58, 0x96,
+			0x69, 0x02, 0x21, 0x37, 0x65, 0xDF, 0xA6, 0x43,
+			0x78, 0x81, 0x8B, 0x39, 0x37, 0xE3, 0xF3, 0xD9,
+			0xA2, 0xAA, 0x3F, 0xA9, 0x21, 0x24, 0x93, 0x4A,
+			0xB0, 0xDE, 0x22, 0x5F, 0xF8, 0xD3, 0xCC, 0x13,
+			0x5C, 0xC2, 0x5C, 0x98, 0x6D, 0xFB, 0x34, 0x26,
+			0xE2, 0xC9, 0x26, 0x23, 0x41, 0xAB, 0xC3, 0x8A,
+			0xEC, 0x62, 0xA9, 0x5B, 0x51, 0xB9, 0x10, 0x9D,
+			0xB1, 0xBB, 0xDE, 0x78, 0xDE, 0xE7, 0xF0, 0x9F,
+			0x91, 0x6C, 0x4D, 0xFC, 0xB3, 0x9C, 0xFF, 0xA4,
+			0x9D, 0xB8, 0xCD, 0xF6, 0xA8, 0x6A, 0xDB, 0x3B,
+			0x82, 0xFE, 0xCD, 0x6B, 0x08, 0x0A, 0x5E, 0x76,
+			0xE9, 0xB3, 0xA2, 0x78, 0x25, 0xDB, 0xB1, 0x76,
+			0x42, 0x2C, 0xFB, 0x20, 0x87, 0x81, 0x76, 0x17,
+			0x99, 0xFD, 0x56, 0x52, 0xE2, 0xB0, 0x8E, 0x1B,
+			0x99, 0xB3, 0x6B, 0x16, 0xC5, 0x4F, 0x0D, 0xBB,
+			0x0E, 0xB7, 0x54, 0x63, 0xD9, 0x67, 0xD9, 0x85,
+			0x1F, 0xA8, 0xF0, 0xF0, 0xB0, 0x41, 0xDC, 0xBC,
+			0x75, 0xEE, 0x23, 0x7D, 0x40, 0xCE, 0xB8, 0x0A,
+			0x6D, 0xC1, 0xD7, 0xCB, 0xAE, 0xCE, 0x91, 0x9E,
+			0x3E, 0x5A, 0x76, 0xF8, 0xC0, 0xF2, 0x7F, 0x0B,
+			0xD2, 0x5F, 0x63, 0xBE, 0xB2, 0x81, 0x8E, 0x6D,
+			0xB3, 0x6B, 0x67, 0x9D, 0xAC, 0xE2, 0xDB, 0x7C,
+			0x11, 0x19, 0x55, 0x55, 0x11, 0xED, 0x7F, 0x4E,
+			0x9E, 0x4B, 0x6E, 0x01, 0x74, 0x4A, 0xE8, 0x78,
+			0xEC, 0xCD, 0xF7, 0xA2, 0x6E, 0xDB, 0xB6, 0x3B,
+			0x4D, 0x2C, 0x09, 0x62, 0x57, 0x6E, 0x38, 0x8A,
+			0x61, 0x17, 0x00, 0xE9, 0x86, 0x7F, 0x3D, 0x93,
+			0xBC, 0xC3, 0x27, 0x90, 0x7E, 0x41, 0x81, 0xBA,
+			0x74, 0x70, 0x19, 0xE8, 0xD2, 0x88, 0x61, 0xDF,
+			0xB4, 0xED, 0xA4, 0x9D, 0x3D, 0xED, 0x95, 0x65,
+			0xCA, 0xFF, 0x8D, 0x58, 0x63, 0x10, 0x9D, 0xBE,
+			0x78, 0x81, 0x47, 0x38
+		},
+		.len_bits = 516 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x78, 0x81, 0x47, 0x38
+		},
+		.len = 4,
+		.offset = 512,
+	},
+	.validDataLen = {
+		.len_bits = 516 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 516 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 512 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_zuc_cipher_aes_ctr_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
+	.auth_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 73 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR,
+	.cipher_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 77 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
+			0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
+			0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
+			0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
+			0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
+			0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
+			0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
+			0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
+			0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
+			0x00
+		},
+		.len_bits = 73 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x53, 0x92, 0x9F, 0x88, 0x32, 0xA1, 0x6D, 0x66,
+			0x00, 0x32, 0x29, 0xF9, 0x14, 0x75, 0x6D, 0xB3,
+			0xEB, 0x64, 0x25, 0x09, 0xE1, 0x80, 0x31, 0x8C,
+			0xF8, 0x47, 0x64, 0xAA, 0x07, 0x8E, 0x06, 0xBF,
+			0x05, 0xD7, 0x43, 0xEE, 0xFF, 0x11, 0x33, 0x4A,
+			0x82, 0xCF, 0x88, 0x6F, 0x33, 0xB2, 0xB5, 0x67,
+			0x50, 0x0A, 0x74, 0x2D, 0xE4, 0x56, 0x40, 0x31,
+			0xEE, 0xB3, 0x6C, 0x6E, 0x6A, 0x7B, 0x20, 0xBA,
+			0x4E, 0x44, 0x34, 0xC8, 0x62, 0x21, 0x8C, 0x45,
+			0xD7, 0x85, 0x44, 0xF4, 0x7E
+		},
+		.len_bits = 77 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x85, 0x44, 0xF4, 0x7E
+		},
+		.len = 4,
+		.offset = 73,
+	},
+	.validDataLen = {
+		.len_bits = 77 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 77 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 73 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_snow_cipher_aes_ctr_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 52 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09
+		},
+		.len_bits = 48 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x91, 0x96, 0x28, 0xB4, 0x89, 0x74, 0xF6, 0x5E,
+			0x98, 0x58, 0xA1, 0xD3, 0x0E, 0xE3, 0xFC, 0x39,
+			0xDB, 0x36, 0xE4, 0x97, 0x74, 0x5B, 0x5E, 0xD4,
+			0x1B, 0x8A, 0xC5, 0x9D, 0xDF, 0x96, 0x97, 0x5F,
+			0x58, 0x4A, 0x75, 0x74, 0x27, 0x07, 0xF3, 0x7F,
+			0xCE, 0x2C, 0x4A, 0x6C, 0xE5, 0x19, 0xE7, 0x8B,
+			0xF3, 0x21, 0x84, 0x6C
+		},
+		.len_bits = 52 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0xF3, 0x21, 0x84, 0x6C
+		},
+		.len = 4,
+		.offset = 48,
+	},
+	.validDataLen = {
+		.len_bits = 52 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 52 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 48 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_snow_cipher_zuc_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 52 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09
+		},
+		.len_bits = 48 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x52, 0x11, 0xCD, 0xFF, 0xF8, 0x88, 0x61, 0x1E,
+			0xF5, 0xD2, 0x8E, 0xEB, 0x2A, 0x49, 0x18, 0x1F,
+			0xF4, 0xDA, 0x8B, 0x19, 0x60, 0x0B, 0x92, 0x9E,
+			0x79, 0x2A, 0x5B, 0x0B, 0x7E, 0xC6, 0x22, 0x36,
+			0x74, 0xA4, 0x6C, 0xBC, 0xF5, 0x25, 0x69, 0xAE,
+			0xDA, 0x04, 0xB9, 0xAF, 0x16, 0x42, 0x0F, 0xCB,
+			0x3E, 0xC9, 0x49, 0xE9
+		},
+		.len_bits = 52 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x3E, 0xC9, 0x49, 0xE9
+		},
+		.len = 4,
+		.offset = 48,
+	},
+	.validDataLen = {
+		.len_bits = 52 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 52 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 48 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_zuc_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
+	.auth_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.auth = {
+		.len_bits = 512 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
+	.cipher_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.cipher = {
+		.len_bits = 516 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
+			0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72,
+			0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77,
+			0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20,
+			0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20,
+			0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73,
+			0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74,
+			0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65,
+			0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65,
+			0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68,
+			0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70,
+			0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75,
+			0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72,
+			0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D,
+			0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65,
+			0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73,
+			0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C,
+			0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E,
+			0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
+			0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E,
+			0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20,
+			0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20,
+			0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69,
+			0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65,
+			0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69,
+			0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73,
+			0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61,
+			0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64,
+			0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61,
+			0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C,
+			0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67,
+			0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72,
+			0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68,
+			0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66,
+			0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62,
+			0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61,
+			0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65,
+			0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F,
+			0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64,
+			0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C,
+			0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74,
+			0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69,
+			0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77,
+			0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65,
+			0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75,
+			0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E,
+			0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F,
+			0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63,
+			0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68,
+			0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C,
+			0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73,
+			0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74,
+			0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20,
+			0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73,
+			0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F,
+			0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75
+		},
+		.len_bits = 512 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x3C, 0x89, 0x1C, 0xE5, 0xB7, 0xDE, 0x61, 0x4D,
+			0x05, 0x37, 0x3F, 0x40, 0xC9, 0xCF, 0x10, 0x07,
+			0x7F, 0x18, 0xC5, 0x96, 0x21, 0xA9, 0xCF, 0xF5,
+			0xBB, 0x9C, 0x22, 0x72, 0x00, 0xBE, 0xAC, 0x4B,
+			0x55, 0x02, 0x19, 0x2B, 0x37, 0x64, 0x15, 0x6B,
+			0x54, 0x74, 0xAE, 0x0F, 0xE7, 0x68, 0xB3, 0x92,
+			0x17, 0x26, 0x75, 0xEE, 0x0B, 0xE9, 0x46, 0x3C,
+			0x6E, 0x76, 0x52, 0x14, 0x2B, 0xD0, 0xB6, 0xD0,
+			0x09, 0x07, 0x17, 0x12, 0x58, 0x61, 0xE8, 0x2A,
+			0x7C, 0x55, 0x67, 0x66, 0x49, 0xD1, 0x4E, 0x2F,
+			0x06, 0x96, 0x3A, 0xF7, 0x05, 0xE3, 0x65, 0x47,
+			0x7C, 0xBB, 0x66, 0x25, 0xC4, 0x73, 0xB3, 0x7B,
+			0x3D, 0x1D, 0x59, 0x54, 0x4E, 0x38, 0x9C, 0x4D,
+			0x10, 0x4B, 0x49, 0xA4, 0x92, 0xC7, 0xD7, 0x17,
+			0x6F, 0xC0, 0xEE, 0x8D, 0xBE, 0xA5, 0xE3, 0xB9,
+			0xBA, 0x5E, 0x88, 0x36, 0x06, 0x19, 0xB7, 0x86,
+			0x66, 0x19, 0x90, 0xC4, 0xAE, 0xB3, 0xFE, 0xA7,
+			0xCF, 0x2A, 0xD8, 0x6C, 0x0E, 0xD5, 0x24, 0x2A,
+			0x92, 0x93, 0xB9, 0x12, 0xCB, 0x50, 0x0A, 0x22,
+			0xB0, 0x09, 0x06, 0x17, 0x85, 0xC9, 0x03, 0x70,
+			0x18, 0xF2, 0xD5, 0x6A, 0x66, 0xC2, 0xB6, 0xC6,
+			0xA5, 0xA3, 0x24, 0xEC, 0xB9, 0x07, 0xD5, 0x8A,
+			0xA0, 0x44, 0x54, 0xD7, 0x21, 0x9F, 0x02, 0x83,
+			0x78, 0x7B, 0x78, 0x9C, 0x97, 0x2A, 0x36, 0x51,
+			0xAF, 0xE1, 0x79, 0x81, 0x07, 0x53, 0xE4, 0xA0,
+			0xC7, 0xCF, 0x10, 0x7C, 0xB2, 0xE6, 0xA1, 0xFD,
+			0x81, 0x0B, 0x96, 0x50, 0x5D, 0xFE, 0xB3, 0xC6,
+			0x75, 0x00, 0x0C, 0x56, 0x83, 0x9B, 0x7B, 0xF4,
+			0xE0, 0x3A, 0xC0, 0xE1, 0xA9, 0xEC, 0xAC, 0x47,
+			0x24, 0xF5, 0x12, 0x1B, 0xD0, 0x28, 0x32, 0xE2,
+			0x3B, 0x42, 0xC1, 0x5B, 0x98, 0x98, 0x78, 0x2D,
+			0xC1, 0x69, 0x05, 0x37, 0x24, 0xF0, 0x73, 0xBA,
+			0xBE, 0x57, 0xAC, 0x40, 0x9A, 0x91, 0x42, 0x49,
+			0x31, 0x0F, 0xED, 0x45, 0xA8, 0x25, 0xFF, 0x1B,
+			0xF4, 0x2F, 0x61, 0x7A, 0xB0, 0x60, 0xC6, 0x5E,
+			0x0E, 0xF6, 0x96, 0x35, 0x90, 0xAF, 0x3B, 0x9D,
+			0x4D, 0x6C, 0xE7, 0xF2, 0x4F, 0xC0, 0xBA, 0x57,
+			0x92, 0x18, 0xB7, 0xF5, 0x1D, 0x06, 0x81, 0xF6,
+			0xE3, 0xF4, 0x66, 0x8C, 0x33, 0x74, 0xBE, 0x64,
+			0x8C, 0x18, 0xED, 0x7F, 0x68, 0x2A, 0xE4, 0xAF,
+			0xF1, 0x02, 0x07, 0x51, 0x22, 0x96, 0xC8, 0x9E,
+			0x23, 0x7F, 0x6A, 0xD7, 0x80, 0x0F, 0x2D, 0xFC,
+			0xCC, 0xD0, 0x95, 0x86, 0x00, 0x2A, 0x77, 0xDD,
+			0xA2, 0x60, 0x1E, 0x0F, 0x8E, 0x42, 0x44, 0x37,
+			0x7E, 0x33, 0xC4, 0xE0, 0x04, 0x53, 0xF6, 0x3F,
+			0xDD, 0x1D, 0x5E, 0x24, 0xDA, 0xAE, 0xEF, 0x06,
+			0x06, 0x05, 0x13, 0x3A, 0x1E, 0xFF, 0xAD, 0xAD,
+			0xEE, 0x0F, 0x6F, 0x05, 0xA5, 0xFB, 0x3B, 0xC3,
+			0xDB, 0xA0, 0x20, 0xC1, 0x65, 0x8B, 0x39, 0xAB,
+			0xC9, 0xEC, 0xA8, 0x31, 0x85, 0x6C, 0xD2, 0xE4,
+			0x76, 0x77, 0x76, 0xD5, 0x81, 0x01, 0x73, 0x36,
+			0x08, 0x8C, 0xC3, 0xD4, 0x70, 0x7A, 0xA3, 0xDF,
+			0xAD, 0x3A, 0x00, 0x46, 0x88, 0x65, 0x10, 0xBE,
+			0xD8, 0x1C, 0x19, 0x98, 0xE9, 0x29, 0xDD, 0x58,
+			0x46, 0x31, 0xEB, 0x3D, 0xD0, 0x12, 0x02, 0x83,
+			0x15, 0xDD, 0x70, 0x27, 0x0D, 0xB5, 0xBB, 0x0C,
+			0xE3, 0xF1, 0x02, 0xF2, 0xD7, 0x1D, 0x17, 0x6D,
+			0xDF, 0x2A, 0x42, 0x1F, 0x01, 0x5C, 0x68, 0xB1,
+			0x64, 0x74, 0xCE, 0x74, 0xB1, 0x3C, 0x2F, 0x43,
+			0x5F, 0xB7, 0x7E, 0x3E, 0x6F, 0xE3, 0xDC, 0x03,
+			0xD9, 0x0C, 0xDD, 0x42, 0x65, 0x7F, 0xEA, 0x69,
+			0x6F, 0xDB, 0xD7, 0xFB, 0xFF, 0x4D, 0xB4, 0x48,
+			0xFE, 0x0F, 0x59, 0x24, 0x8F, 0x13, 0xA8, 0x60,
+			0xF7, 0x13, 0xE5, 0xB1, 0x8D, 0xB7, 0x70, 0xEE,
+			0x82, 0x8F, 0xCF, 0x7E
+		},
+		.len_bits = 516 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x82, 0x8F, 0xCF, 0x7E
+		},
+		.len = 4,
+		.offset = 512,
+	},
+	.validDataLen = {
+		.len_bits = 516 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 516 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 512 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_null_cipher_snow_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_NULL,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 44 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A,
+		},
+		.len_bits = 44 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A,
+			0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB,
+			0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16,
+			0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8,
+			0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4,
+			0xCB, 0xEB, 0x97, 0x06, 0x1C, 0xB5, 0x72, 0x34
+		},
+		.len_bits = 48 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x1C, 0xB5, 0x72, 0x34
+		},
+		.len = 4,
+		.offset = 44,
+	},
+	.validDataLen = {
+		.len_bits = 48 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 48 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 44 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_null_cipher_zuc_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_NULL,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 52 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09
+		},
+		.len_bits = 48 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x52, 0x11, 0xCD, 0xFF, 0xF8, 0x88, 0x61, 0x1E,
+			0xF5, 0xD2, 0x8E, 0xEB, 0x2A, 0x49, 0x18, 0x1F,
+			0xF4, 0xDA, 0x8B, 0x19, 0x60, 0x0B, 0x92, 0x9E,
+			0x79, 0x2A, 0x5B, 0x0B, 0x7E, 0xC6, 0x22, 0x36,
+			0x74, 0xA4, 0x6C, 0xBC, 0xF5, 0x25, 0x69, 0xAE,
+			0xDA, 0x04, 0xB9, 0xAF, 0x16, 0x42, 0x0F, 0xCB,
+			0x06, 0x7C, 0x1D, 0x29
+		},
+		.len_bits = 52 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x06, 0x7C, 0x1D, 0x29
+		},
+		.len = 4,
+		.offset = 48,
+	},
+	.validDataLen = {
+		.len_bits = 52 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 52 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 48 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_snow_cipher_null_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_NULL,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 52 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09
+		},
+		.len_bits = 48 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09,
+			0x38, 0xB5, 0x54, 0xC0
+		},
+		.len_bits = 52 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x38, 0xB5, 0x54, 0xC0
+		},
+		.len = 4,
+		.offset = 48,
+	},
+	.validDataLen = {
+		.len_bits = 52 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 52 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 48 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_zuc_cipher_null_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
+	.auth_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 73 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_NULL,
+	.cipher_key = {
+		.data = {
+			0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+			0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+			0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 77 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
+			0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
+			0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
+			0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
+			0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
+			0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
+			0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
+			0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
+			0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
+			0x00
+		},
+		.len_bits = 73 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
+			0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
+			0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
+			0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
+			0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
+			0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
+			0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
+			0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
+			0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
+			0x00, 0x24, 0xa8, 0x42, 0xb3
+		},
+		.len_bits = 77 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x24, 0xa8, 0x42, 0xb3
+		},
+		.len = 4,
+		.offset = 73,
+	},
+	.validDataLen = {
+		.len_bits = 77 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 77 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 73 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_null_cipher_aes_ctr_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_NULL,
+	.auth_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.auth = {
+		.len_bits = 48 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR,
+	.cipher_key = {
+		.data = {
+			0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+			0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+		},
+		.len = 16,
+	},
+	.cipher = {
+		.len_bits = 52 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+			0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+			0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+			0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+			0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+			0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09
+		},
+		.len_bits = 48 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x91, 0x96, 0x28, 0xB4, 0x89, 0x74, 0xF6, 0x5E,
+			0x98, 0x58, 0xA1, 0xD3, 0x0E, 0xE3, 0xFC, 0x39,
+			0xDB, 0x36, 0xE4, 0x97, 0x74, 0x5B, 0x5E, 0xD4,
+			0x1B, 0x8A, 0xC5, 0x9D, 0xDF, 0x96, 0x97, 0x5F,
+			0x58, 0x4A, 0x75, 0x74, 0x27, 0x07, 0xF3, 0x7F,
+			0xCE, 0x2C, 0x4A, 0x6C, 0xE5, 0x19, 0xE7, 0x8B,
+			0xCB, 0x94, 0xD0, 0xAC
+		},
+		.len_bits = 52 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0xCB, 0x94, 0xD0, 0xAC
+		},
+		.len = 4,
+		.offset = 48,
+	},
+	.validDataLen = {
+		.len_bits = 52 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 52 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 48 << 3,
+	}
+};
+
+struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_null_test_case_1 = {
+	.auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
+	.auth_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.auth_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.auth = {
+		.len_bits = 512 << 3,
+		.offset_bits = 0,
+	},
+	.cipher_algo = RTE_CRYPTO_CIPHER_NULL,
+	.cipher_key = {
+		.data = {
+			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+		},
+		.len = 16,
+	},
+	.cipher_iv = {
+		.data = {
+		},
+		.len = 0,
+	},
+	.cipher = {
+		.len_bits = 516 << 3,
+		.offset_bits = 0,
+	},
+	.plaintext = {
+		.data = {
+			0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
+			0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72,
+			0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77,
+			0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20,
+			0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20,
+			0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73,
+			0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74,
+			0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65,
+			0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65,
+			0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68,
+			0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70,
+			0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75,
+			0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72,
+			0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D,
+			0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65,
+			0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73,
+			0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C,
+			0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E,
+			0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
+			0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E,
+			0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20,
+			0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20,
+			0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69,
+			0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65,
+			0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69,
+			0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73,
+			0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61,
+			0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64,
+			0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61,
+			0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C,
+			0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67,
+			0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72,
+			0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68,
+			0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66,
+			0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62,
+			0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61,
+			0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65,
+			0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F,
+			0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64,
+			0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C,
+			0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74,
+			0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69,
+			0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77,
+			0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65,
+			0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75,
+			0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E,
+			0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F,
+			0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63,
+			0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68,
+			0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C,
+			0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73,
+			0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74,
+			0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20,
+			0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73,
+			0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F,
+			0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75
+		},
+		.len_bits = 512 << 3,
+	},
+	.ciphertext = {
+		.data = {
+			0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
+			0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72,
+			0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77,
+			0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20,
+			0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20,
+			0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73,
+			0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74,
+			0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65,
+			0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65,
+			0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68,
+			0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70,
+			0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75,
+			0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72,
+			0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D,
+			0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65,
+			0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73,
+			0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C,
+			0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E,
+			0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
+			0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E,
+			0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20,
+			0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20,
+			0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69,
+			0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65,
+			0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69,
+			0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73,
+			0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61,
+			0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64,
+			0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61,
+			0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C,
+			0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67,
+			0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72,
+			0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68,
+			0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66,
+			0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62,
+			0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20,
+			0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61,
+			0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65,
+			0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F,
+			0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+			0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64,
+			0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64,
+			0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C,
+			0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74,
+			0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69,
+			0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77,
+			0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65,
+			0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75,
+			0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E,
+			0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F,
+			0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63,
+			0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68,
+			0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C,
+			0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73,
+			0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74,
+			0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20,
+			0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+			0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73,
+			0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F,
+			0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75,
+			0x4C, 0x77, 0x87, 0xA0
+		},
+		.len_bits = 516 << 3,
+	},
+	.digest_enc = {
+		.data = {
+			0x4C, 0x77, 0x87, 0xA0
+		},
+		.len = 4,
+		.offset = 512,
+	},
+	.validDataLen = {
+		.len_bits = 516 << 3,
+	},
+	.validCipherLen = {
+		.len_bits = 516 << 3,
+	},
+	.validAuthLen = {
+		.len_bits = 512 << 3,
+	}
+};
+
 #endif /* TEST_CRYPTODEV_MIXED_TEST_VECTORS_H_ */
-- 
2.25.1


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

* [dpdk-stable] [PATCH 19.11 3/4] common/qat: get firmware version
  2020-07-29 14:22 [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 2/4] test/crypto: add mixed encypted-digest Adam Dybkowski
@ 2020-07-29 14:22 ` Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 4/4] crypto/qat: handle mixed hash-cipher on GEN2 Adam Dybkowski
  2020-08-06 10:00 ` [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Luca Boccassi
  3 siblings, 0 replies; 5+ messages in thread
From: Adam Dybkowski @ 2020-07-29 14:22 UTC (permalink / raw)
  To: stable, fiona.trahe, luca.boccassi; +Cc: Adam Dybkowski

[ upstream commit 7444111408ba9a00e40fcc9318b8ae83cac76735 ]

This patch adds the function for retrieving QAT firmware
version, required to check the internal capabilities that
depend on the FW version.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/common/qat/qat_adf/icp_qat_fw.h |  2 +
 drivers/common/qat/qat_qp.c             | 93 +++++++++++++++++++++++++
 drivers/common/qat/qat_qp.h             |  3 +
 3 files changed, 98 insertions(+)

diff --git a/drivers/common/qat/qat_adf/icp_qat_fw.h b/drivers/common/qat/qat_adf/icp_qat_fw.h
index 1265c2a13..be10fc9bd 100644
--- a/drivers/common/qat/qat_adf/icp_qat_fw.h
+++ b/drivers/common/qat/qat_adf/icp_qat_fw.h
@@ -121,6 +121,8 @@ struct icp_qat_fw_comn_resp {
 #define ICP_QAT_FW_COMN_CNV_FLAG_MASK 0x1
 #define ICP_QAT_FW_COMN_CNVNR_FLAG_BITPOS 5
 #define ICP_QAT_FW_COMN_CNVNR_FLAG_MASK 0x1
+#define ICP_QAT_FW_COMN_NULL_VERSION_FLAG_BITPOS 0
+#define ICP_QAT_FW_COMN_NULL_VERSION_FLAG_MASK 0x1
 
 #define ICP_QAT_FW_COMN_OV_SRV_TYPE_GET(icp_qat_fw_comn_req_hdr_t) \
 	icp_qat_fw_comn_req_hdr_t.service_type
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 03f11f869..26ec854da 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -3,6 +3,7 @@
  */
 
 #include <rte_common.h>
+#include <rte_cycles.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
@@ -19,6 +20,7 @@
 #include "qat_comp.h"
 #include "adf_transport_access_macros.h"
 
+#define QAT_CQ_MAX_DEQ_RETRIES 10
 
 #define ADF_MAX_DESC				4096
 #define ADF_MIN_DESC				128
@@ -685,6 +687,97 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
 	return resp_counter;
 }
 
+/* This is almost same as dequeue_op_burst, without the atomic, without stats
+ * and without the op. Dequeues one response.
+ */
+static uint8_t
+qat_cq_dequeue_response(struct qat_qp *qp, void *out_data)
+{
+	uint8_t result = 0;
+	uint8_t retries = 0;
+	struct qat_queue *queue = &(qp->rx_q);
+	struct icp_qat_fw_comn_resp *resp_msg = (struct icp_qat_fw_comn_resp *)
+			((uint8_t *)queue->base_addr + queue->head);
+
+	while (retries++ < QAT_CQ_MAX_DEQ_RETRIES &&
+			*(uint32_t *)resp_msg == ADF_RING_EMPTY_SIG) {
+		/* loop waiting for response until we reach the timeout */
+		rte_delay_ms(20);
+	}
+
+	if (*(uint32_t *)resp_msg != ADF_RING_EMPTY_SIG) {
+		/* response received */
+		result = 1;
+
+		/* check status flag */
+		if (ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(
+				resp_msg->comn_hdr.comn_status) ==
+				ICP_QAT_FW_COMN_STATUS_FLAG_OK) {
+			/* success */
+			memcpy(out_data, resp_msg, queue->msg_size);
+		} else {
+			memset(out_data, 0, queue->msg_size);
+		}
+
+		queue->head = adf_modulo(queue->head + queue->msg_size,
+				queue->modulo_mask);
+		rxq_free_desc(qp, queue);
+	}
+
+	return result;
+}
+
+/* Sends a NULL message and extracts QAT fw version from the response.
+ * Used to determine detailed capabilities based on the fw version number.
+ * This assumes that there are no inflight messages, i.e. assumes there's space
+ * on the qp, one message is sent and only one response collected.
+ * Returns fw version number or 0 for unknown version or a negative error code.
+ */
+int
+qat_cq_get_fw_version(struct qat_qp *qp)
+{
+	struct qat_queue *queue = &(qp->tx_q);
+	uint8_t *base_addr = (uint8_t *)queue->base_addr;
+	struct icp_qat_fw_comn_req null_msg;
+	struct icp_qat_fw_comn_resp response;
+
+	/* prepare the NULL request */
+	memset(&null_msg, 0, sizeof(null_msg));
+	null_msg.comn_hdr.hdr_flags =
+		ICP_QAT_FW_COMN_HDR_FLAGS_BUILD(ICP_QAT_FW_COMN_REQ_FLAG_SET);
+	null_msg.comn_hdr.service_type = ICP_QAT_FW_COMN_REQ_NULL;
+	null_msg.comn_hdr.service_cmd_id = ICP_QAT_FW_NULL_REQ_SERV_ID;
+
+#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
+	QAT_DP_HEXDUMP_LOG(DEBUG, "NULL request", &null_msg, sizeof(null_msg));
+#endif
+
+	/* send the NULL request */
+	memcpy(base_addr + queue->tail, &null_msg, sizeof(null_msg));
+	queue->tail = adf_modulo(queue->tail + queue->msg_size,
+			queue->modulo_mask);
+	txq_write_tail(qp, queue);
+
+	/* receive a response */
+	if (qat_cq_dequeue_response(qp, &response)) {
+
+#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
+		QAT_DP_HEXDUMP_LOG(DEBUG, "NULL response:", &response,
+				sizeof(response));
+#endif
+		/* if LW0 bit 24 is set - then the fw version was returned */
+		if (QAT_FIELD_GET(response.comn_hdr.hdr_flags,
+				ICP_QAT_FW_COMN_NULL_VERSION_FLAG_BITPOS,
+				ICP_QAT_FW_COMN_NULL_VERSION_FLAG_MASK))
+			return response.resrvd[0]; /* return LW4 */
+		else
+			return 0; /* not set - we don't know fw version */
+	}
+
+	QAT_LOG(ERR, "No response received");
+	return -EINVAL;
+}
+
 __rte_weak int
 qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused,
 			  void *op_cookie __rte_unused,
diff --git a/drivers/common/qat/qat_qp.h b/drivers/common/qat/qat_qp.h
index 980c2ba32..d0bf91509 100644
--- a/drivers/common/qat/qat_qp.h
+++ b/drivers/common/qat/qat_qp.h
@@ -105,6 +105,9 @@ int
 qat_qps_per_service(const struct qat_qp_hw_data *qp_hw_data,
 			enum qat_service_type service);
 
+int
+qat_cq_get_fw_version(struct qat_qp *qp);
+
 /* Needed for weak function*/
 int
 qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused,
-- 
2.25.1


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

* [dpdk-stable] [PATCH 19.11 4/4] crypto/qat: handle mixed hash-cipher on GEN2
  2020-07-29 14:22 [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 2/4] test/crypto: add mixed encypted-digest Adam Dybkowski
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 3/4] common/qat: get firmware version Adam Dybkowski
@ 2020-07-29 14:22 ` Adam Dybkowski
  2020-08-06 10:00 ` [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Luca Boccassi
  3 siblings, 0 replies; 5+ messages in thread
From: Adam Dybkowski @ 2020-07-29 14:22 UTC (permalink / raw)
  To: stable, fiona.trahe, luca.boccassi; +Cc: Adam Dybkowski

[ upstream commit a1598e90f353b609df41b077c59dbd1f378d23c0 ]

This patch adds handling of mixed hash-cipher algorithms
available on GEN2 QAT in particular firmware versions.
Also the documentation is updated to show the mixed crypto
algorithms are supported on QAT GEN2.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 doc/guides/cryptodevs/qat.rst        | 13 ++++++++-----
 drivers/crypto/qat/qat_sym_pmd.c     | 27 +++++++++++++++++++++++++++
 drivers/crypto/qat/qat_sym_pmd.h     |  7 ++++++-
 drivers/crypto/qat/qat_sym_session.c | 17 +++++++++++------
 4 files changed, 52 insertions(+), 12 deletions(-)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 9053ae9c0..c83540968 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -82,18 +82,17 @@ All the usual chains are supported and also some mixed chains:
    +------------------+-----------+-------------+----------+----------+
    | Cipher algorithm | NULL AUTH | SNOW3G UIA2 | ZUC EIA3 | AES CMAC |
    +==================+===========+=============+==========+==========+
-   | NULL CIPHER      | Y         | 3           | 3        | Y        |
+   | NULL CIPHER      | Y         | 2&3         | 2&3      | Y        |
    +------------------+-----------+-------------+----------+----------+
-   | SNOW3G UEA2      | 3         | Y           | 3        | 3        |
+   | SNOW3G UEA2      | 2&3       | Y           | 2&3      | 2&3      |
    +------------------+-----------+-------------+----------+----------+
-   | ZUC EEA3         | 3         | 3           | 2&3      | 3        |
+   | ZUC EEA3         | 2&3       | 2&3         | 2&3      | 2&3      |
    +------------------+-----------+-------------+----------+----------+
-   | AES CTR          | Y         | 3           | 3        | Y        |
+   | AES CTR          | Y         | 2&3         | 2&3      | Y        |
    +------------------+-----------+-------------+----------+----------+
 
 * The combinations marked as "Y" are supported on all QAT hardware versions.
 * The combinations marked as "2&3" are supported on GEN2/GEN3 QAT hardware only.
-* The combinations marked as "3" are supported on GEN3 QAT hardware only.
 
 
 Limitations
@@ -117,6 +116,8 @@ Limitations
   enqueued to the device and will be marked as failed. The simplest way to
   mitigate this is to use the bdf whitelist to avoid mixing devices of different
   generations in the same process if planning to use for GCM.
+* The mixed algo feature on GEN2 is not supported by all kernel drivers. Check
+  the notes under the Available Kernel Drivers table below for specific details.
 
 Extra notes on KASUMI F9
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -350,6 +351,8 @@ to see the full table)
    | Yes | No  | No  | 3   | C4xxx    | p             | qat_c4xxx     | c4xxx      | 18a0   | 1    | 18a1   | 128    |
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
 
+* Note: Symmetric mixed crypto algorithms feature on Gen 2 works only with 01.org driver version 4.9.0+
+
 The first 3 columns indicate the service:
 
 * S = Symmetric crypto service (via cryptodev API)
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 71f21ceb2..e7849f641 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -14,6 +14,8 @@
 #include "qat_sym_session.h"
 #include "qat_sym_pmd.h"
 
+#define MIXED_CRYPTO_MIN_FW_VER 0x04090000
+
 uint8_t cryptodev_qat_driver_id;
 
 static const struct rte_cryptodev_capabilities qat_gen1_sym_capabilities[] = {
@@ -186,6 +188,31 @@ static int qat_sym_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 				qat_sgl_dst);
 	}
 
+	/* Get fw version from QAT (GEN2), skip if we've got it already */
+	if (qp->qat_dev_gen == QAT_GEN2 && !(qat_private->internal_capabilities
+			& QAT_SYM_CAP_VALID)) {
+		ret = qat_cq_get_fw_version(qp);
+
+		if (ret < 0) {
+			qat_sym_qp_release(dev, qp_id);
+			return ret;
+		}
+
+		if (ret != 0)
+			QAT_LOG(DEBUG, "QAT firmware version: %d.%d.%d",
+					(ret >> 24) & 0xff,
+					(ret >> 16) & 0xff,
+					(ret >> 8) & 0xff);
+		else
+			QAT_LOG(DEBUG, "unknown QAT firmware version");
+
+		/* set capabilities based on the fw version */
+		qat_private->internal_capabilities = QAT_SYM_CAP_VALID |
+				((ret >= MIXED_CRYPTO_MIN_FW_VER) ?
+						QAT_SYM_CAP_MIXED_CRYPTO : 0);
+		ret = 0;
+	}
+
 	return ret;
 }
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 7ddaf453e..3acc3d238 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -15,6 +15,10 @@
 /** Intel(R) QAT Symmetric Crypto PMD driver name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
 
+/* Internal capabilities */
+#define QAT_SYM_CAP_MIXED_CRYPTO	(1 << 0)
+#define QAT_SYM_CAP_VALID		(1 << 31)
+
 extern uint8_t cryptodev_qat_driver_id;
 
 /** private data structure for a QAT device.
@@ -27,7 +31,8 @@ struct qat_sym_dev_private {
 	uint8_t sym_dev_id;
 	/**< Device instance for this rte_cryptodev */
 	const struct rte_cryptodev_capabilities *qat_dev_capabilities;
-	/* QAT device symmetric crypto capabilities */
+	/**< QAT device symmetric crypto capabilities */
+	uint32_t internal_capabilities; /* see flags QAT_SYM_CAP_xxx */
 };
 
 int
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 4359f2f0b..bf6af60aa 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -459,18 +459,23 @@ qat_sym_session_set_ext_hash_flags(struct qat_sym_session *session,
 }
 
 static void
-qat_sym_session_handle_mixed(struct qat_sym_session *session)
+qat_sym_session_handle_mixed(const struct rte_cryptodev *dev,
+		struct qat_sym_session *session)
 {
+	const struct qat_sym_dev_private *qat_private = dev->data->dev_private;
+	enum qat_device_gen min_dev_gen = (qat_private->internal_capabilities &
+			QAT_SYM_CAP_MIXED_CRYPTO) ? QAT_GEN2 : QAT_GEN3;
+
 	if (session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 &&
 			session->qat_cipher_alg !=
 			ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3) {
-		session->min_qat_dev_gen = QAT_GEN3;
+		session->min_qat_dev_gen = min_dev_gen;
 		qat_sym_session_set_ext_hash_flags(session,
 			1 << ICP_QAT_FW_AUTH_HDR_FLAG_ZUC_EIA3_BITPOS);
 	} else if (session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2 &&
 			session->qat_cipher_alg !=
 			ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2) {
-		session->min_qat_dev_gen = QAT_GEN3;
+		session->min_qat_dev_gen = min_dev_gen;
 		qat_sym_session_set_ext_hash_flags(session,
 			1 << ICP_QAT_FW_AUTH_HDR_FLAG_SNOW3G_UIA2_BITPOS);
 	} else if ((session->aes_cmac ||
@@ -479,7 +484,7 @@ qat_sym_session_handle_mixed(struct qat_sym_session *session)
 			ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2 ||
 			session->qat_cipher_alg ==
 			ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3)) {
-		session->min_qat_dev_gen = QAT_GEN3;
+		session->min_qat_dev_gen = min_dev_gen;
 		qat_sym_session_set_ext_hash_flags(session, 0);
 	}
 }
@@ -532,7 +537,7 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev,
 			if (ret < 0)
 				return ret;
 			/* Special handling of mixed hash+cipher algorithms */
-			qat_sym_session_handle_mixed(session);
+			qat_sym_session_handle_mixed(dev, session);
 		}
 		break;
 	case ICP_QAT_FW_LA_CMD_HASH_CIPHER:
@@ -551,7 +556,7 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev,
 			if (ret < 0)
 				return ret;
 			/* Special handling of mixed hash+cipher algorithms */
-			qat_sym_session_handle_mixed(session);
+			qat_sym_session_handle_mixed(dev, session);
 		}
 		break;
 	case ICP_QAT_FW_LA_CMD_TRNG_GET_RANDOM:
-- 
2.25.1


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

* Re: [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3
  2020-07-29 14:22 [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Adam Dybkowski
                   ` (2 preceding siblings ...)
  2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 4/4] crypto/qat: handle mixed hash-cipher on GEN2 Adam Dybkowski
@ 2020-08-06 10:00 ` Luca Boccassi
  3 siblings, 0 replies; 5+ messages in thread
From: Luca Boccassi @ 2020-08-06 10:00 UTC (permalink / raw)
  To: Adam Dybkowski, stable, fiona.trahe

On Wed, 2020-07-29 at 16:22 +0200, Adam Dybkowski wrote:
> [ upstream commit bcd7e3e8e6e18ce94c8aa02b949fc0274bd1faeb ]
> 
> This patch implements handling mixed encrypted digest hash-cipher
> requests (e.g. SNOW3G + ZUC or ZUC + AES CTR) possible when running
> on GEN3 QAT. Such algorithm combinations are not supported on
> GEN1/GEN2 hardware.
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
>  doc/guides/cryptodevs/qat.rst              | 24 ++++++++
>  drivers/common/qat/qat_adf/icp_qat_fw.h    |  3 +
>  drivers/common/qat/qat_adf/icp_qat_fw_la.h |  2 +
>  drivers/crypto/qat/qat_sym_session.c       | 72 ++++++++++++++++++++++
>  4 files changed, 101 insertions(+)

Thanks, series applied - with the understanding that it's a PMD-
internal change that is backward/forward compatible.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2020-08-06 10:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 14:22 [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Adam Dybkowski
2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 2/4] test/crypto: add mixed encypted-digest Adam Dybkowski
2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 3/4] common/qat: get firmware version Adam Dybkowski
2020-07-29 14:22 ` [dpdk-stable] [PATCH 19.11 4/4] crypto/qat: handle mixed hash-cipher on GEN2 Adam Dybkowski
2020-08-06 10:00 ` [dpdk-stable] [PATCH 19.11 1/4] crypto/qat: handle mixed hash-cipher requests on GEN3 Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).