Skip to contentSkip to conversation

fixes and new features to cnxk crypto PMD

PATCH In review Tejasree Kondoj 2 participants 9 messages Jun 9, 2025 – Jun 17, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

v2 cover fixes and new features to cnxk crypto PMD

This series adds fixes and new features to cnxk crypto PMD.

v2:
* Combined few patches into one.
* Updated patch titles and description.
* Updated doc and release notes.

Nithinsen Kaithakadan (3):
common/cnxk: fix salt handling with aes-ctr
common/cnxk: update qsize in CPT iq enable
crypto/cnxk: copy 8B iv into sess in aes ctr

Rupesh Chiluka (2):
crypto/cnxk: extend check for max supported gather entries crypto/cnxk: support asymmetric sessionless mode

Tejasree Kondoj (2):
crypto/cnxk: fix compilation error
crypto/cnxk: add meta variable in CPT structure

 doc/guides/cryptodevs/features/cn10k.ini  |  1 +
 doc/guides/cryptodevs/features/cn9k.ini   |  1 +
 doc/guides/rel_notes/release_25_07.rst    |  1 +
 drivers/common/cnxk/cnxk_security.c       |  8 ++
 drivers/common/cnxk/roc_cpt.c             |  5 ++
 drivers/common/cnxk/roc_cpt_sg.h          |  1 +
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 91 +++++++++++++++++++++--
 drivers/crypto/cnxk/cn10k_ipsec_la_ops.h  | 17 ++++-
 drivers/crypto/cnxk/cn10k_tls_ops.h       | 10 +++
 drivers/crypto/cnxk/cn20k_ipsec_la_ops.h  | 17 ++++-
 drivers/crypto/cnxk/cn20k_tls_ops.h       | 10 +++
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c  | 77 ++++++++++++++++++-
 drivers/crypto/cnxk/cn9k_ipsec_la_ops.h   | 10 +++
 drivers/crypto/cnxk/cnxk_cryptodev.c      |  3 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c  |  5 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.h  |  4 +
 drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h |  3 +
 17 files changed, 247 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/7 crypto/cnxk: fix compilation error

Fixing compilation failure by including
required headers.

Fixes 26bb5c4de63e ("crypto/cnxk: add CPT raw submission PMD API")
---
 drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h +3 -0
index 02278605a2..46861ab2cf 100644
@@ -13,6 +13,9 @@
 
 #include <stdint.h>
 
+#include <rte_crypto.h>
+#include <rte_security.h>
+
 /* Forward declarations */
 
 /**
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 2/7 common/cnxk: fix salt handling with aes-ctr

In reply to Tejasree Kondoj

From: Nithinsen Kaithakadan <[email protected]>

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")
---
 drivers/common/cnxk/cnxk_security.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/common/cnxk/cnxk_security.c +8 -0
index ea3b87e65c..0e6777e6ca 100644
@@ -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;
Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 3/7 crypto/cnxk: extend check for max supported gather entries

In reply to Tejasree Kondoj

From: Rupesh Chiluka <[email protected]>

Extend check for max supported gather entries in CNXK CPT PMD.

---
 drivers/common/cnxk/roc_cpt_sg.h         |  1 +
 drivers/crypto/cnxk/cn10k_ipsec_la_ops.h | 10 ++++++++++
 drivers/crypto/cnxk/cn10k_tls_ops.h      | 10 ++++++++++
 drivers/crypto/cnxk/cn20k_ipsec_la_ops.h | 10 ++++++++++
 drivers/crypto/cnxk/cn20k_tls_ops.h      | 10 ++++++++++
 drivers/crypto/cnxk/cn9k_ipsec_la_ops.h  | 10 ++++++++++
 6 files changed, 51 insertions(+)
drivers/common/cnxk/roc_cpt_sg.h +1 -0
index e7e01cd29a..7c3caf94d7 100644
@@ -15,6 +15,7 @@
 #define ROC_SG_MAX_COMP	     25
 #define ROC_SG_MAX_DLEN_SIZE (ROC_SG_LIST_HDR_SIZE + (ROC_SG_MAX_COMP * ROC_SG_ENTRY_SIZE))
 #define ROC_SG2_MAX_PTRS 48
+#define ROC_SG1_MAX_PTRS 32
 
 struct roc_sglist_comp {
 	union {
drivers/crypto/cnxk/cn10k_ipsec_la_ops.h +10 -0
index 87442c2a1f..0cc6283c7e 100644
@@ -105,6 +105,11 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k_s
 			return -ENOMEM;
 		}
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
@@ -224,6 +229,11 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn10k_sec_session *sess, struct
 		void *m_data;
 		int i;
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
drivers/crypto/cnxk/cn10k_tls_ops.h +10 -0
index 427c31425c..90600bd850 100644
@@ -117,6 +117,11 @@ process_tls_write(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k
 			return -ENOMEM;
 		}
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
@@ -255,6 +260,11 @@ process_tls_read(struct rte_crypto_op *cop, struct cn10k_sec_session *sess,
 		uint32_t dlen;
 		int i;
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
drivers/crypto/cnxk/cn20k_ipsec_la_ops.h +10 -0
index eff51bd794..505fddb517 100644
@@ -104,6 +104,11 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn20k_s
 			return -ENOMEM;
 		}
 
+		if (unlikely(m_src->nb_segs > ROC_SG2_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
@@ -163,6 +168,11 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn20k_sec_session *sess, struct
 		void *m_data;
 		int i;
 
+		if (unlikely(m_src->nb_segs > ROC_SG2_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
drivers/crypto/cnxk/cn20k_tls_ops.h +10 -0
index 14f879f2a9..9f70a1d42d 100644
@@ -118,6 +118,11 @@ process_tls_write(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn20k
 			return -ENOMEM;
 		}
 
+		if (unlikely(m_src->nb_segs > ROC_SG2_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
@@ -194,6 +199,11 @@ process_tls_read(struct rte_crypto_op *cop, struct cn20k_sec_session *sess,
 		uint32_t g_size_bytes;
 		int i;
 
+		if (unlikely(m_src->nb_segs > ROC_SG2_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
drivers/crypto/cnxk/cn9k_ipsec_la_ops.h +10 -0
index befd5b0c05..79e00e3c57 100644
@@ -111,6 +111,11 @@ process_outb_sa(struct cpt_qp_meta_info *m_info, struct rte_crypto_op *cop,
 			return -ENOMEM;
 		}
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
@@ -206,6 +211,11 @@ process_inb_sa(struct cpt_qp_meta_info *m_info, struct rte_crypto_op *cop,
 		void *m_data;
 		int i;
 
+		if (unlikely(m_src->nb_segs > ROC_SG1_MAX_PTRS)) {
+			plt_dp_err("Exceeds max supported components. Reduce segments");
+			return -1;
+		}
+
 		m_data = alloc_op_meta(NULL, m_info->mlen, m_info->pool, infl_req);
 		if (unlikely(m_data == NULL)) {
 			plt_dp_err("Error allocating meta buffer for request");
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 4/7 crypto/cnxk: add meta variable in CPT structure

In reply to Tejasree Kondoj

Adding meta variable in CPT high level structure to pass custom metadata to CN20K firmware.

---
 drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 ++++
 1 file changed, 4 insertions(+)
drivers/crypto/cnxk/cnxk_cryptodev_ops.h +4 -0
index df8d08b7c5..17d39aa34f 100644
@@ -30,6 +30,8 @@
 /* Default command timeout in seconds */
 #define DEFAULT_COMMAND_TIMEOUT 4
 
+#define META_LEN 64
+
 #define MOD_INC(i, l) ((i) == (l - 1) ? (i) = 0 : (i)++)
 
 #define CN10K_CPT_PKTS_PER_LOOP 64
@@ -58,6 +60,7 @@ struct __rte_aligned(ROC_ALIGN) cpt_inflight_req {
 		struct rte_event_vector *vec;
 	};
 	void *mdata;
+	uint8_t meta[META_LEN];
 	uint8_t op_flags;
 #ifdef CPT_INST_DEBUG_ENABLE
 	uint8_t scatter_sz;
@@ -70,6 +73,7 @@ struct __rte_aligned(ROC_ALIGN) cpt_inflight_req {
 };
 
 PLT_STATIC_ASSERT(sizeof(struct cpt_inflight_req) == ROC_CACHE_LINE_SZ);
+PLT_STATIC_ASSERT(offsetof(struct cpt_inflight_req, meta) == 32);
 
 struct pending_queue {
 	/** Array of pending requests */
Signature · 1 line
2.25.1
#5 lore raw

PATCH v2 5/7 crypto/cnxk: support asymmetric sessionless mode

In reply to Tejasree Kondoj

From: Rupesh Chiluka <[email protected]>

Add support for sessionless asymmetric operations in cnxk CPT PMD.

---
 doc/guides/cryptodevs/features/cn10k.ini  |  1 +
 doc/guides/cryptodevs/features/cn9k.ini   |  1 +
 doc/guides/rel_notes/release_25_07.rst    |  1 +
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 91 +++++++++++++++++++++--
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c  | 77 ++++++++++++++++++-
 drivers/crypto/cnxk/cnxk_cryptodev.c      |  3 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c  |  5 +-
 7 files changed, 168 insertions(+), 11 deletions(-)
doc/guides/cryptodevs/features/cn10k.ini +1 -0
index bfd35489a0..31e8061df9 100644
@@ -17,6 +17,7 @@ Symmetric sessionless  = Y
 RSA PRIV OP KEY EXP    = Y
 RSA PRIV OP KEY QT     = Y
 Digest encrypted       = Y
+Asymmetric sessionless = Y
 Sym raw data path API  = Y
 Inner checksum         = Y
 Rx inject              = Y
doc/guides/cryptodevs/features/cn9k.ini +1 -0
index d70771d9bd..1f0f48bfce 100644
@@ -17,6 +17,7 @@ Symmetric sessionless  = Y
 RSA PRIV OP KEY EXP    = Y
 RSA PRIV OP KEY QT     = Y
 Digest encrypted       = Y
+Asymmetric sessionless = Y
 
 ;
 ; Supported crypto algorithms of 'cn9k' crypto driver.
doc/guides/rel_notes/release_25_07.rst +1 -0
index 9673bb3c62..8f02fe8023 100644
@@ -95,6 +95,7 @@ New Features
 * **Updated Marvell cnxk crypto driver.**
 
   * Added support for CN20K SoC in cnxk CPT driver.
+  * Added support for sessionless asymmetric operations.
 
 * **Added eventdev vector adapter.**
 
drivers/crypto/cnxk/cn10k_cryptodev_ops.c +86 -5

122 lines not on this page · raw message

drivers/crypto/cnxk/cn9k_cryptodev_ops.c +74 -3

101 lines not on this page · raw message

drivers/crypto/cnxk/cnxk_cryptodev.c +2 -1
index 96b5121097..5828a502e4 100644
@@ -19,7 +19,8 @@ cnxk_cpt_default_ff_get(void)
 		      RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | RTE_CRYPTODEV_FF_IN_PLACE_SGL |
 		      RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT | RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
 		      RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
-		      RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED | RTE_CRYPTODEV_FF_SECURITY;
+		      RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED | RTE_CRYPTODEV_FF_SECURITY |
+		      RTE_CRYPTODEV_FF_ASYM_SESSIONLESS;
 
 	if (roc_model_is_cn10k() || roc_model_is_cn20k())
 		ff |= RTE_CRYPTODEV_FF_SECURITY_INNER_CSUM | RTE_CRYPTODEV_FF_SYM_RAW_DP;
drivers/crypto/cnxk/cnxk_cryptodev_ops.c +3 -2
index e5ca082e10..261e14b418 100644
@@ -866,7 +866,8 @@ cnxk_ae_session_size_get(struct rte_cryptodev *dev __rte_unused)
 }
 
 void
-cnxk_ae_session_clear(struct rte_cryptodev *dev, struct rte_cryptodev_asym_session *sess)
+cnxk_ae_session_clear(struct rte_cryptodev *dev __rte_unused,
+		      struct rte_cryptodev_asym_session *sess)
 {
 	struct cnxk_ae_sess *priv = (struct cnxk_ae_sess *)sess;
 
@@ -878,7 +879,7 @@ cnxk_ae_session_clear(struct rte_cryptodev *dev, struct rte_cryptodev_asym_sessi
 	cnxk_ae_free_session_parameters(priv);
 
 	/* Reset and free object back to pool */
-	memset(priv, 0, cnxk_ae_session_size_get(dev));
+	memset(priv, 0, sizeof(struct cnxk_ae_sess));
 }
 
 int
Signature · 1 line
2.25.1
#6 lore raw

PATCH v2 6/7 common/cnxk: update qsize in CPT iq enable

In reply to Tejasree Kondoj

From: Nithinsen Kaithakadan <[email protected]>

Reconfigure qsize in each CPT iq enable call.

Fixes 3bf87839559 ("common/cnxk: move instruction queue enable to ROC")
---
 drivers/common/cnxk/roc_cpt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/common/cnxk/roc_cpt.c +5 -0
index b4bf0ccd64..d1ba2b8858 100644
@@ -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);
 
Signature · 1 line
2.25.1
#7 lore raw

PATCH v2 7/7 crypto/cnxk: copy 8B iv into sess in aes ctr

In reply to Tejasree Kondoj

From: Nithinsen Kaithakadan <[email protected]>

Copy 8 bytes of the IV into the iv field within the session for the AES CTR algorithm.

---
 drivers/crypto/cnxk/cn10k_ipsec_la_ops.h | 7 ++++---
 drivers/crypto/cnxk/cn20k_ipsec_la_ops.h | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/crypto/cnxk/cn10k_ipsec_la_ops.h +4 -3
index 0cc6283c7e..b9122a509a 100644
@@ -32,7 +32,7 @@ ipsec_po_sa_iv_set(struct cn10k_sec_session *sess, struct rte_crypto_op *cop)
 }
 
 static inline void
-ipsec_po_sa_aes_gcm_iv_set(struct cn10k_sec_session *sess, struct rte_crypto_op *cop)
+ipsec_po_sa_aes_8b_iv_set(struct cn10k_sec_session *sess, struct rte_crypto_op *cop)
 {
 	uint8_t *iv = &sess->sa.out_sa.iv.s.iv_dbg1[0];
 	uint32_t *tmp_iv;
@@ -63,8 +63,9 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k_s
 	if (sess->sa.out_sa.w2.s.iv_src == ROC_IE_OT_SA_IV_SRC_FROM_SA) {
 		if (sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_GCM ||
 		    sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_CCM ||
-		    sess->sa.out_sa.w2.s.auth_type == ROC_IE_SA_AUTH_AES_GMAC)
-			ipsec_po_sa_aes_gcm_iv_set(sess, cop);
+		    sess->sa.out_sa.w2.s.auth_type == ROC_IE_SA_AUTH_AES_GMAC ||
+		    sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_CTR)
+			ipsec_po_sa_aes_8b_iv_set(sess, cop);
 		else
 			ipsec_po_sa_iv_set(sess, cop);
 	}
drivers/crypto/cnxk/cn20k_ipsec_la_ops.h +4 -3
index 505fddb517..2f860c1855 100644
@@ -31,7 +31,7 @@ ipsec_po_sa_iv_set(struct cn20k_sec_session *sess, struct rte_crypto_op *cop)
 }
 
 static inline void
-ipsec_po_sa_aes_gcm_iv_set(struct cn20k_sec_session *sess, struct rte_crypto_op *cop)
+ipsec_po_sa_aes_8b_iv_set(struct cn20k_sec_session *sess, struct rte_crypto_op *cop)
 {
 	uint8_t *iv = &sess->sa.out_sa.iv.s.iv_dbg1[0];
 	uint32_t *tmp_iv;
@@ -62,8 +62,9 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn20k_s
 	if (sess->sa.out_sa.w2.s.iv_src == ROC_IE_OW_SA_IV_SRC_FROM_SA) {
 		if (sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_GCM ||
 		    sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_CCM ||
-		    sess->sa.out_sa.w2.s.auth_type == ROC_IE_SA_AUTH_AES_GMAC)
-			ipsec_po_sa_aes_gcm_iv_set(sess, cop);
+		    sess->sa.out_sa.w2.s.auth_type == ROC_IE_SA_AUTH_AES_GMAC ||
+		    sess->sa.out_sa.w2.s.enc_type == ROC_IE_SA_ENC_AES_CTR)
+			ipsec_po_sa_aes_8b_iv_set(sess, cop);
 		else
 			ipsec_po_sa_iv_set(sess, cop);
 	}
Signature · 1 line
2.25.1
#8 lore raw
In reply to Tejasree Kondoj
Quoted 41 lines

-----Original Message-----
From: Tejasree Kondoj <[email protected]>
Sent: Monday, June 9, 2025 4:11 PM
To: Akhil Goyal <[email protected]>
Cc: Anoob Joseph <[email protected]>; Nithinsen Kaithakadan <[email protected]>; Rupesh Chiluka <[email protected]>; Vidya Sagar Velumuri <[email protected]>; [email protected]
Subject: [PATCH v2 0/7] fixes and new features to cnxk crypto PMD

This series adds fixes and new features to cnxk crypto PMD.

v2:
* Combined few patches into one.
* Updated patch titles and description.
* Updated doc and release notes.

Nithinsen Kaithakadan (3):
common/cnxk: fix salt handling with aes-ctr
common/cnxk: update qsize in CPT iq enable
crypto/cnxk: copy 8B iv into sess in aes ctr

Rupesh Chiluka (2):
crypto/cnxk: extend check for max supported gather entries crypto/cnxk: support asymmetric sessionless mode

Tejasree Kondoj (2):
crypto/cnxk: fix compilation error
crypto/cnxk: add meta variable in CPT structure

 doc/guides/cryptodevs/features/cn10k.ini  |  1 +
 doc/guides/cryptodevs/features/cn9k.ini   |  1 +
 doc/guides/rel_notes/release_25_07.rst    |  1 +
 drivers/common/cnxk/cnxk_security.c       |  8 ++
 drivers/common/cnxk/roc_cpt.c             |  5 ++
 drivers/common/cnxk/roc_cpt_sg.h          |  1 +
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 91 +++++++++++++++++++++--
 drivers/crypto/cnxk/cn10k_ipsec_la_ops.h  | 17 ++++-
 drivers/crypto/cnxk/cn10k_tls_ops.h       | 10 +++
 drivers/crypto/cnxk/cn20k_ipsec_la_ops.h  | 17 ++++-
Quoted 9 lines
 drivers/crypto/cnxk/cn20k_tls_ops.h       | 10 +++
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c  | 77 ++++++++++++++++++-
 drivers/crypto/cnxk/cn9k_ipsec_la_ops.h   | 10 +++
 drivers/crypto/cnxk/cnxk_cryptodev.c      |  3 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c  |  5 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.h  |  4 +
 drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h |  3 +
 17 files changed, 247 insertions(+), 17 deletions(-)

Series Applied to dpdk-next-crypto
Thanks.