[dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:58:55 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/20. 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.

Thanks.

Luca Boccassi

---
>From 9b5cf4fecdee61d25ba9cc32d880d117b6f66c89 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal at nxp.com>
Date: Fri, 5 Jun 2020 01:34:10 +0530
Subject: [PATCH] crypto/dpaax_sec: fix inline query for descriptors

[ upstream commit 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 ]

The maximum length of job descriptor which is formed
is 13 words and hence rta_inline_query should take
care of the max descriptor(shared + job) lengths and
thus find out of the key can be referenced or immediate.

Fixes: 05b12700cd4c ("crypto/dpaa_sec: support null algos for protocol offload")
Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")

Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/common/dpaax/caamflib/desc.h        | 2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 ++--
 drivers/crypto/dpaa_sec/dpaa_sec.c          | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc.h b/drivers/common/dpaax/caamflib/desc.h
index e4139aaa9..635d6bad0 100644
--- a/drivers/common/dpaax/caamflib/desc.h
+++ b/drivers/common/dpaax/caamflib/desc.h
@@ -26,7 +26,7 @@ extern enum rta_sec_era rta_sec_era;
 #define CAAM_CMD_SZ sizeof(uint32_t)
 #define CAAM_PTR_SZ sizeof(dma_addr_t)
 #define CAAM_DESC_BYTES_MAX (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE)
-#define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 5 + CAAM_PTR_SZ * 3)
+#define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 7 + CAAM_PTR_SZ * 3)
 
 /* Block size of any entity covered/uncovered with a KEK/TKEK */
 #define KEK_BLOCKSIZE		16
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 434310cfd..9f8399e2b 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2192,7 +2192,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
 
 	priv->flc_desc[0].desc[0] = aeaddata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)priv->flc_desc[0].desc,
 			       &priv->flc_desc[0].desc[1], 1);
 
@@ -2410,7 +2410,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
 	priv->flc_desc[0].desc[0] = cipherdata.keylen;
 	priv->flc_desc[0].desc[1] = authdata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)priv->flc_desc[0].desc,
 			       &priv->flc_desc[0].desc[2], 2);
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 4442469e2..35f1feac4 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -348,7 +348,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
 	cdb->sh_desc[0] = cipherdata.keylen;
 	cdb->sh_desc[1] = authdata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)cdb->sh_desc,
 			       &cdb->sh_desc[2], 2);
 
@@ -534,7 +534,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
 		cdb->sh_desc[0] = alginfo_c.keylen;
 		cdb->sh_desc[1] = alginfo_a.keylen;
 		err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-				       MIN_JOB_DESC_SIZE,
+				       DESC_JOB_IO_LEN,
 				       (unsigned int *)cdb->sh_desc,
 				       &cdb->sh_desc[2], 2);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.287828866 +0100
+++ 0097-crypto-dpaax_sec-fix-inline-query-for-descriptors.patch	2020-07-24 12:53:48.339007429 +0100
@@ -1,8 +1,10 @@
-From 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 Mon Sep 17 00:00:00 2001
+From 9b5cf4fecdee61d25ba9cc32d880d117b6f66c89 Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal at nxp.com>
 Date: Fri, 5 Jun 2020 01:34:10 +0530
 Subject: [PATCH] crypto/dpaax_sec: fix inline query for descriptors
 
+[ upstream commit 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 ]
+
 The maximum length of job descriptor which is formed
 is 13 words and hence rta_inline_query should take
 care of the max descriptor(shared + job) lengths and
@@ -10,7 +12,6 @@
 
 Fixes: 05b12700cd4c ("crypto/dpaa_sec: support null algos for protocol offload")
 Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")
-Cc: stable at dpdk.org
 
 Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
@@ -34,7 +35,7 @@
  /* Block size of any entity covered/uncovered with a KEK/TKEK */
  #define KEK_BLOCKSIZE		16
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index 60fdced78..c56fb2152 100644
+index 434310cfd..9f8399e2b 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 @@ -2192,7 +2192,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
@@ -46,7 +47,7 @@
  			       (unsigned int *)priv->flc_desc[0].desc,
  			       &priv->flc_desc[0].desc[1], 1);
  
-@@ -2416,7 +2416,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
+@@ -2410,7 +2410,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
  	priv->flc_desc[0].desc[0] = cipherdata.keylen;
  	priv->flc_desc[0].desc[1] = authdata.keylen;
  	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
@@ -56,10 +57,10 @@
  			       &priv->flc_desc[0].desc[2], 2);
  
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 01e79c8ea..5ce7e3582 100644
+index 4442469e2..35f1feac4 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -351,7 +351,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
+@@ -348,7 +348,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
  	cdb->sh_desc[0] = cipherdata.keylen;
  	cdb->sh_desc[1] = authdata.keylen;
  	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
@@ -68,7 +69,7 @@
  			       (unsigned int *)cdb->sh_desc,
  			       &cdb->sh_desc[2], 2);
  
-@@ -537,7 +537,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
+@@ -534,7 +534,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
  		cdb->sh_desc[0] = alginfo_c.keylen;
  		cdb->sh_desc[1] = alginfo_a.keylen;
  		err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,


More information about the stable mailing list