patch 'crypto/qat: fix SM3 auth mode' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:24:38 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/1536a7304aa84119a36a8ebd0da70cf4b726c2d2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 1536a7304aa84119a36a8ebd0da70cf4b726c2d2 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power at intel.com>
Date: Wed, 1 Mar 2023 13:59:15 +0000
Subject: [PATCH] crypto/qat: fix SM3 auth mode
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 6291de627734e465e4645117dab4b7546393e20e ]

The SM3 auth mode is now set to 0, to support plain hash only.
This is also added to the capabilities for GEN3 and GEN4.
SM3 HMAC is not supported.

Fixes: 75fd4bbc94ab ("crypto/qat: support SM3 hash algorithm")

Signed-off-by: Ciara Power <ciara.power at intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 3 +++
 drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 3 +++
 drivers/crypto/qat/qat_sym_session.c         | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
index 7f00f6097d..2a0ddab8af 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -140,6 +140,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
 	QAT_SYM_CIPHER_CAP(SM4_CTR,
 		CAP_SET(block_size, 16),
 		CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 16, 16, 0)),
+	QAT_SYM_PLAIN_AUTH_CAP(SM3,
+		CAP_SET(block_size, 64),
+		CAP_RNG(digest_size, 32, 32, 0)),
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index b1e5fa9a82..b219a418ba 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -100,6 +100,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen4[] = {
 	QAT_SYM_CIPHER_CAP(SM4_CTR,
 		CAP_SET(block_size, 16),
 		CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 16, 16, 0)),
+	QAT_SYM_PLAIN_AUTH_CAP(SM3,
+		CAP_SET(block_size, 64),
+		CAP_RNG(digest_size, 32, 32, 0)),
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 46a30d6539..52ed921db2 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -697,7 +697,7 @@ qat_sym_session_configure_auth(struct rte_cryptodev *dev,
 	switch (auth_xform->algo) {
 	case RTE_CRYPTO_AUTH_SM3:
 		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SM3;
-		session->auth_mode = ICP_QAT_HW_AUTH_MODE2;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
 		break;
 	case RTE_CRYPTO_AUTH_SHA1:
 		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.070718200 +0800
+++ 0090-crypto-qat-fix-SM3-auth-mode.patch	2023-04-09 21:45:38.709042200 +0800
@@ -1 +1 @@
-From 6291de627734e465e4645117dab4b7546393e20e Mon Sep 17 00:00:00 2001
+From 1536a7304aa84119a36a8ebd0da70cf4b726c2d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6291de627734e465e4645117dab4b7546393e20e ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 5fa898dc8f..6013fed721 100644
+index 7f00f6097d..2a0ddab8af 100644
@@ -25 +27 @@
-@@ -152,6 +152,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
+@@ -140,6 +140,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
@@ -50 +52 @@
-index 466482d225..6ad6c7ee3a 100644
+index 46a30d6539..52ed921db2 100644


More information about the stable mailing list