From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 39DCF1B4C7; Fri, 26 Apr 2019 21:28:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 12:28:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="137776436" Received: from sivswdev09.ir.intel.com (HELO localhost.localdomain) ([10.237.217.48]) by orsmga008.jf.intel.com with ESMTP; 26 Apr 2019 12:28:06 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: thomas@monjalon.net, akhil.goyal@nxp.com, arkadiuszx.kusztal@intel.com, bernard.iremonger@intel.com, Fiona Trahe , stable@dpdk.org Date: Fri, 26 Apr 2019 20:28:03 +0100 Message-Id: <1556306883-15097-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] crypto/qat: fix NULL cipher algo for non 8-byte multiple X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 19:28:11 -0000 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2595AA05D3 for ; Fri, 26 Apr 2019 21:28:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0C761B60D; Fri, 26 Apr 2019 21:28:11 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 39DCF1B4C7; Fri, 26 Apr 2019 21:28:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 12:28:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="137776436" Received: from sivswdev09.ir.intel.com (HELO localhost.localdomain) ([10.237.217.48]) by orsmga008.jf.intel.com with ESMTP; 26 Apr 2019 12:28:06 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: thomas@monjalon.net, akhil.goyal@nxp.com, arkadiuszx.kusztal@intel.com, bernard.iremonger@intel.com, Fiona Trahe , stable@dpdk.org Date: Fri, 26 Apr 2019 20:28:03 +0100 Message-Id: <1556306883-15097-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] crypto/qat: fix NULL cipher algo for non 8-byte multiple X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190426192803.jfRBE7FY5aEip_zqbi9wUz8-FmxEGGnYIZ-Vzn9i_1Q@z> 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 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