patch 'crypto/cnxk: fix CN20K CPT error recovery' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:54 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/88b11eea59f76a12f961e1e3e28553c2c3d1437f

Thanks.

Kevin

---
>From 88b11eea59f76a12f961e1e3e28553c2c3d1437f Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree at marvell.com>
Date: Mon, 19 Oct 2026 18:37:47 +0530
Subject: [PATCH] crypto/cnxk: fix CN20K CPT error recovery

[ upstream commit 38ff91399fcbd207635a1920b1210eb541135fc1 ]

Reprogram completion queue base and size registers in
roc_cpt_cq_enable as hardware clears them after fatal error.
Also reset pending queue head and tail during queue pair reset so
software completion state stays aligned with the reset hardware
queue.

Fixes: 13ce9121c3c0 ("common/cnxk: add routines to operate CPT CQ")
Fixes: 4e8a41acaffb ("crypto/cnxk: support CPT CQ for CN20K")

Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
---
 drivers/common/cnxk/roc_cpt.c            | 13 +++++++++++++
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c |  6 ++++++
 2 files changed, 19 insertions(+)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 13eb9d3767..18474a34fe 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -1128,5 +1128,18 @@ void
 roc_cpt_cq_enable(struct roc_cpt_lf *lf)
 {
+	union cpt_lf_cq_base lf_cq_base = {.u = 0x0};
+	union cpt_lf_cq_size lf_cq_size = {.u = 0x0};
 	union cpt_lf_cq_ctl lf_cq_ctl = {.u = 0x0};
+	uintptr_t addr;
+
+	/* Disable completion queue */
+	roc_cpt_cq_disable(lf);
+
+	/* Reconfigure CQ base and size, same as cpt_lf_cq_init() */
+	addr = (uintptr_t)lf->cq_vaddr;
+	lf_cq_base.s.addr = addr >> 7;
+	plt_write64(lf_cq_base.u, lf->rbase + CPT_LF_CQ_BASE);
+	lf_cq_size.s.size = lf->cq_size;
+	plt_write64(lf_cq_size.u, lf->rbase + CPT_LF_CQ_SIZE);
 
 	lf_cq_ctl.s.ena = 1;
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index cd3c15e29d..c16c3a4b51 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -569,4 +569,5 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,
 	if (conf == NULL) {
 		struct cnxk_cpt_vf *vf = dev->data->dev_private;
+		struct cnxk_cpt_qp *qp;
 		struct roc_cpt_lf *lf;
 
@@ -576,4 +577,9 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,
 		lf = vf->cpt.lf[qp_id];
 		roc_cpt_lf_reset(lf);
+
+		qp = dev->data->queue_pairs[qp_id];
+		qp->pend_q.head = 0;
+		qp->pend_q.tail = 0;
+
 		roc_cpt_iq_enable(lf);
 
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:46.267611350 +0000
+++ 0248-crypto-cnxk-fix-CN20K-CPT-error-recovery.patch	2026-12-03 12:52:39.201206909 +0000
@@ -1 +1 @@
-From 38ff91399fcbd207635a1920b1210eb541135fc1 Mon Sep 17 00:00:00 2001
+From 88b11eea59f76a12f961e1e3e28553c2c3d1437f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 38ff91399fcbd207635a1920b1210eb541135fc1 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 8c60a28fff..eae3f134e9 100644
+index 13eb9d3767..18474a34fe 100644
@@ -26 +27 @@
-@@ -1148,5 +1148,18 @@ void
+@@ -1128,5 +1128,18 @@ void
@@ -46 +47 @@
-index 1e0ea9d358..95f64a79ae 100644
+index cd3c15e29d..c16c3a4b51 100644
@@ -49 +50 @@
-@@ -597,4 +597,5 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,
+@@ -569,4 +569,5 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,
@@ -55 +56 @@
-@@ -604,4 +605,9 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,
+@@ -576,4 +577,9 @@ cnxk_cpt_queue_pair_reset(struct rte_cryptodev *dev, uint16_t qp_id,



More information about the stable mailing list