patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v2 1/7] crypto/cnxk: fix compilation error
       [not found] <20250609104038.3102767-1-ktejasree@marvell.com>
@ 2025-06-09 10:40 ` Tejasree Kondoj
  2025-06-09 10:40 ` [PATCH v2 2/7] common/cnxk: fix salt handling with aes-ctr Tejasree Kondoj
  2025-06-09 10:40 ` [PATCH v2 6/7] common/cnxk: update qsize in CPT iq enable Tejasree Kondoj
  2 siblings, 0 replies; 3+ messages in thread
From: Tejasree Kondoj @ 2025-06-09 10:40 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Anoob Joseph, Nithinsen Kaithakadan, Rupesh Chiluka,
	Vidya Sagar Velumuri, dev, stable

Fixing compilation failure by including
required headers.

Fixes: 26bb5c4de63e ("crypto/cnxk: add CPT raw submission PMD API")
Cc: stable@dpdk.org

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h b/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h
index 02278605a2..46861ab2cf 100644
--- a/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h
+++ b/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h
@@ -13,6 +13,9 @@
 
 #include <stdint.h>
 
+#include <rte_crypto.h>
+#include <rte_security.h>
+
 /* Forward declarations */
 
 /**
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 2/7] common/cnxk: fix salt handling with aes-ctr
       [not found] <20250609104038.3102767-1-ktejasree@marvell.com>
  2025-06-09 10:40 ` [PATCH v2 1/7] crypto/cnxk: fix compilation error Tejasree Kondoj
@ 2025-06-09 10:40 ` Tejasree Kondoj
  2025-06-09 10:40 ` [PATCH v2 6/7] common/cnxk: update qsize in CPT iq enable Tejasree Kondoj
  2 siblings, 0 replies; 3+ messages in thread
From: Tejasree Kondoj @ 2025-06-09 10:40 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Nithinsen Kaithakadan, Anoob Joseph, Rupesh Chiluka,
	Vidya Sagar Velumuri, dev, stable

From: Nithinsen Kaithakadan <nkaithakadan@marvell.com>

This patch includes fix for setting correct salt value
for CTR algorithm.

Fixes: 78d03027f2cc ("common/cnxk: add IPsec common code")
Fixes: 532963b8070 ("crypto/cnxk: move IPsec SA creation to common")
Cc: stable@dpdk.org

Signed-off-by: Nithinsen Kaithakadan <nkaithakadan@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/common/cnxk/cnxk_security.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index ea3b87e65c..0e6777e6ca 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -96,6 +96,9 @@ ot_ipsec_sa_common_param_fill(union roc_ot_ipsec_sa_word2 *w2, uint8_t *cipher_k
 				break;
 			case RTE_CRYPTO_CIPHER_AES_CTR:
 				w2->s.enc_type = ROC_IE_SA_ENC_AES_CTR;
+				memcpy(salt_key, &ipsec_xfrm->salt, 4);
+				tmp_salt = (uint32_t *)salt_key;
+				*tmp_salt = rte_be_to_cpu_32(*tmp_salt);
 				break;
 			case RTE_CRYPTO_CIPHER_3DES_CBC:
 				w2->s.enc_type = ROC_IE_SA_ENC_3DES_CBC;
@@ -962,6 +965,8 @@ on_fill_ipsec_common_sa(struct rte_security_ipsec_xform *ipsec,
 		cipher_key_len = crypto_xform->aead.key.length;
 	} else {
 		if (cipher_xform) {
+			if (cipher_xform->cipher.algo == RTE_CRYPTO_CIPHER_AES_CTR)
+				memcpy(common_sa->iv.gcm.nonce, &ipsec->salt, 4);
 			cipher_key = cipher_xform->cipher.key.data;
 			cipher_key_len = cipher_xform->cipher.key.length;
 		}
@@ -1282,6 +1287,9 @@ ow_ipsec_sa_common_param_fill(union roc_ow_ipsec_sa_word2 *w2, uint8_t *cipher_k
 				break;
 			case RTE_CRYPTO_CIPHER_AES_CTR:
 				w2->s.enc_type = ROC_IE_SA_ENC_AES_CTR;
+				memcpy(salt_key, &ipsec_xfrm->salt, 4);
+				tmp_salt = (uint32_t *)salt_key;
+				*tmp_salt = rte_be_to_cpu_32(*tmp_salt);
 				break;
 			case RTE_CRYPTO_CIPHER_3DES_CBC:
 				w2->s.enc_type = ROC_IE_SA_ENC_3DES_CBC;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 6/7] common/cnxk: update qsize in CPT iq enable
       [not found] <20250609104038.3102767-1-ktejasree@marvell.com>
  2025-06-09 10:40 ` [PATCH v2 1/7] crypto/cnxk: fix compilation error Tejasree Kondoj
  2025-06-09 10:40 ` [PATCH v2 2/7] common/cnxk: fix salt handling with aes-ctr Tejasree Kondoj
@ 2025-06-09 10:40 ` Tejasree Kondoj
  2 siblings, 0 replies; 3+ messages in thread
From: Tejasree Kondoj @ 2025-06-09 10:40 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Nithinsen Kaithakadan, Anoob Joseph, Rupesh Chiluka,
	Vidya Sagar Velumuri, dev, stable

From: Nithinsen Kaithakadan <nkaithakadan@marvell.com>

Reconfigure qsize in each CPT iq enable call.

Fixes: 3bf87839559 ("common/cnxk: move instruction queue enable to ROC")
Cc: stable@dpdk.org

Signed-off-by: Nithinsen Kaithakadan <nkaithakadan@marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index b4bf0ccd64..d1ba2b8858 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -1125,9 +1125,14 @@ roc_cpt_iq_disable(struct roc_cpt_lf *lf)
 void
 roc_cpt_iq_enable(struct roc_cpt_lf *lf)
 {
+	union cpt_lf_q_size lf_q_size;
 	union cpt_lf_inprog lf_inprog;
 	union cpt_lf_ctl lf_ctl;
 
+	/* Reconfigure the QSIZE register to ensure NQ_PTR and DQ_PTR are reset */
+	lf_q_size.u = plt_read64(lf->rbase + CPT_LF_Q_SIZE);
+	plt_write64(lf_q_size.u, lf->rbase + CPT_LF_Q_SIZE);
+
 	/* Disable command queue */
 	roc_cpt_iq_disable(lf);
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-09 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250609104038.3102767-1-ktejasree@marvell.com>
2025-06-09 10:40 ` [PATCH v2 1/7] crypto/cnxk: fix compilation error Tejasree Kondoj
2025-06-09 10:40 ` [PATCH v2 2/7] common/cnxk: fix salt handling with aes-ctr Tejasree Kondoj
2025-06-09 10:40 ` [PATCH v2 6/7] common/cnxk: update qsize in CPT iq enable Tejasree Kondoj

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).