patch 'crypto/cnxk: fix update of number of descriptors' has been queued to stable release 21.11.1
Kevin Traynor
ktraynor at redhat.com
Mon Feb 21 16:36:20 CET 2022
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. 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/0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2
Thanks.
Kevin
---
>From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj at marvell.com>
Date: Mon, 31 Jan 2022 18:00:29 +0530
Subject: [PATCH] crypto/cnxk: fix update of number of descriptors
[ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ]
Pending queue also need to be adjusted while updating the number of
descriptors.
Fixes: a455fd869cd7 ("common/cnxk: align CPT queue depth to power of 2")
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
drivers/common/cnxk/roc_cpt.c | 3 ---
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 8 ++++++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 0e2dc45ad8..6179df2f1f 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -572,7 +572,4 @@ cpt_lf_init(struct roc_cpt_lf *lf)
lf->nb_desc = CPT_LF_DEFAULT_NB_DESC;
- /* Update nb_desc to next power of 2 to aid in pending queue checks */
- lf->nb_desc = plt_align32pow2(lf->nb_desc);
-
/* Allocate memory for instruction queue for CPT LF. */
iq_mem = plt_zmalloc(cpt_lf_iq_mem_calc(lf->nb_desc), ROC_ALIGN);
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 21ee09f962..0d99c891d9 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -362,4 +362,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
struct rte_pci_device *pci_dev;
struct cnxk_cpt_qp *qp;
+ uint32_t nb_desc;
int ret;
@@ -374,5 +375,8 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
}
- qp = cnxk_cpt_qp_create(dev, qp_id, conf->nb_descriptors);
+ /* Update nb_desc to next power of 2 to aid in pending queue checks */
+ nb_desc = plt_align32pow2(conf->nb_descriptors);
+
+ qp = cnxk_cpt_qp_create(dev, qp_id, nb_desc);
if (qp == NULL) {
plt_err("Could not create queue pair %d", qp_id);
@@ -381,5 +385,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
qp->lf.lf_id = qp_id;
- qp->lf.nb_desc = conf->nb_descriptors;
+ qp->lf.nb_desc = nb_desc;
ret = roc_cpt_lf_init(roc_cpt, &qp->lf);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.666331963 +0000
+++ 0191-crypto-cnxk-fix-update-of-number-of-descriptors.patch 2022-02-21 15:22:44.376704768 +0000
@@ -1 +1 @@
-From a45f37334b8db6b1f2678e84d6529663e7252219 Mon Sep 17 00:00:00 2001
+From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 89877d1b28..b3a3649fff 100644
+index 0e2dc45ad8..6179df2f1f 100644
@@ -32 +33 @@
-index 67a2d9b08e..a5fb68da02 100644
+index 21ee09f962..0d99c891d9 100644
More information about the stable
mailing list