patch 'crypto/virtio: remove explicit cookie allocation' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 20 19:04:03 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
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/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/800e67411629e28e3512bd4f49604c721c518811
Thanks.
Luca Boccassi
---
>From 800e67411629e28e3512bd4f49604c721c518811 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau at intel.com>
Date: Mon, 6 Jul 2026 09:57:46 +0000
Subject: [PATCH] crypto/virtio: remove explicit cookie allocation
[ upstream commit 10bc7595cbab2f747284c9b240ed9326fb3a039d ]
The Rx/Tx functions allocate cookies as needed, no need to
allocate and free from heap.
Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")
Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
Tested-by: Yu Jiang <yux.jiang at intel.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: Kai Ji <kai.ji at intel.com>
---
drivers/crypto/virtio/virtio_cryptodev.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 034a479994..1dcfd70218 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -295,8 +295,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
unsigned int vq_size, size;
struct virtio_crypto_hw *hw = dev->data->dev_private;
struct virtqueue *vq = NULL;
- uint32_t i = 0;
- uint32_t j;
PMD_INIT_FUNC_TRACE();
@@ -358,17 +356,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
"Cannot create mempool");
goto mpool_create_err;
}
- for (i = 0; i < vq_size; i++) {
- vq->vq_descx[i].cookie =
- rte_zmalloc("crypto PMD op cookie pointer",
- sizeof(struct virtio_crypto_op_cookie),
- RTE_CACHE_LINE_SIZE);
- if (vq->vq_descx[i].cookie == NULL) {
- VIRTIO_CRYPTO_DRV_LOG_ERR("Failed to "
- "alloc mem for cookie");
- goto cookie_alloc_err;
- }
- }
}
vq->hw = hw;
@@ -432,12 +419,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
vring_addr_err:
rte_memzone_free(mz);
mz_reserve_err:
-cookie_alloc_err:
- rte_mempool_free(vq->mpool);
- if (i != 0) {
- for (j = 0; j < i; j++)
- rte_free(vq->vq_descx[j].cookie);
- }
mpool_create_err:
rte_free(vq);
return -ENOMEM;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-20 18:03:26.219428853 +0100
+++ 0019-crypto-virtio-remove-explicit-cookie-allocation.patch 2026-07-20 18:03:25.516443432 +0100
@@ -1 +1 @@
-From 10bc7595cbab2f747284c9b240ed9326fb3a039d Mon Sep 17 00:00:00 2001
+From 800e67411629e28e3512bd4f49604c721c518811 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10bc7595cbab2f747284c9b240ed9326fb3a039d ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -17,2 +18,2 @@
- drivers/crypto/virtio/virtio_cryptodev.c | 23 -----------------------
- 1 file changed, 23 deletions(-)
+ drivers/crypto/virtio/virtio_cryptodev.c | 19 -------------------
+ 1 file changed, 19 deletions(-)
@@ -21 +22 @@
-index 6f079f15f6..d70651646e 100644
+index 034a479994..1dcfd70218 100644
@@ -24,20 +25,2 @@
-@@ -68,7 +68,6 @@ void
- virtio_crypto_queue_release(struct virtqueue *vq)
- {
- struct virtio_crypto_hw *hw;
-- uint16_t i;
-
- PMD_INIT_FUNC_TRACE();
-
-@@ -80,9 +79,6 @@ virtio_crypto_queue_release(struct virtqueue *vq)
- hw->vqs[vq->vq_queue_index] = NULL;
- rte_memzone_free(vq->mz);
- rte_mempool_free(vq->mpool);
-- for (i = 0; i < vq->vq_nentries; i++)
-- rte_free(vq->vq_descx[i].cookie);
--
- rte_free(vq);
- }
- }
-@@ -102,8 +98,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
- unsigned int vq_size;
+@@ -295,8 +295,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
+ unsigned int vq_size, size;
@@ -51 +34 @@
-@@ -175,29 +169,12 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
+@@ -358,17 +356,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
@@ -55 +38 @@
-- for (i = 0; i < nb_desc; i++) {
+- for (i = 0; i < vq_size; i++) {
@@ -68,4 +51,5 @@
- *pvq = vq;
-
- return 0;
-
+ vq->hw = hw;
+@@ -432,12 +419,6 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
+ vring_addr_err:
+ rte_memzone_free(mz);
+ mz_reserve_err:
More information about the stable
mailing list