From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, akhil.goyal@nxp.com,
arkadiuszx.kusztal@intel.com, bernard.iremonger@intel.com,
Fiona Trahe <fiona.trahe@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] crypto/qat: fix NULL cipher algo for non 8-byte multiple
Date: Fri, 26 Apr 2019 20:28:03 +0100 [thread overview]
Message-ID: <1556306883-15097-1-git-send-email-fiona.trahe@intel.com> (raw)
Message-ID: <20190426192803.jfRBE7FY5aEip_zqbi9wUz8-FmxEGGnYIZ-Vzn9i_1Q@z> (raw)
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 <fiona.trahe@intel.com>
---
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 5cc86f554..f66175d03 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.13.6
next reply other threads:[~2019-04-26 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 19:28 Fiona Trahe [this message]
2019-04-26 19:28 ` Fiona Trahe
2019-04-30 13:55 ` Akhil Goyal
2019-04-30 13:55 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556306883-15097-1-git-send-email-fiona.trahe@intel.com \
--to=fiona.trahe@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=arkadiuszx.kusztal@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).