From 20f1cb1aaf77535d11526c5a1c165eeeeddeff6a Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Fri, 26 Apr 2019 20:28:03 +0100 Subject: [PATCH] crypto/qat: fix null cipher algo for non 8-byte multiple NULL cipher algo of 4-byte multiple and other sizes caused firmware hang due to use of wrong mode. Changed from ECB mode to CTR mode to fix. Fixes: 98f060891615 ("crypto/qat: add symmetric session file") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe --- drivers/crypto/qat/qat_sym_session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 5cc86f5543..f66175d039 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -242,7 +242,8 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev, session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE; break; case RTE_CRYPTO_CIPHER_NULL: - session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE; + session->qat_cipher_alg = ICP_QAT_HW_CIPHER_ALGO_NULL; + session->qat_mode = ICP_QAT_HW_CIPHER_CTR_MODE; break; case RTE_CRYPTO_CIPHER_KASUMI_F8: if (qat_sym_validate_kasumi_key(cipher_xform->key.length, -- 2.20.1