dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] crypto/virtio: free memory used by op cookies
@ 2025-10-11  4:32 Gowrishankar Muthukrishnan
  2025-10-11  4:37 ` [PATCH v2] " Gowrishankar Muthukrishnan
  0 siblings, 1 reply; 2+ messages in thread
From: Gowrishankar Muthukrishnan @ 2025-10-11  4:32 UTC (permalink / raw)
  To: dev, Akhil Goyal, Jay Zhou, Fan Zhang
  Cc: anoobj, Gowrishankar Muthukrishnan, stable

Free memory used by virt queue op cookies in dev close.

Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Change-Id: Idbf87e6ef5bede3cadfae587b5a6d7592f5d5cf3
---
 drivers/crypto/virtio/virtio_cryptodev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index d661ce8025..6f079f15f6 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -68,6 +68,7 @@ void
 virtio_crypto_queue_release(struct virtqueue *vq)
 {
 	struct virtio_crypto_hw *hw;
+	uint16_t i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -79,6 +80,9 @@ 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);
 	}
 }
-- 
2.37.1


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

end of thread, other threads:[~2025-10-11  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-11  4:32 [PATCH v1] crypto/virtio: free memory used by op cookies Gowrishankar Muthukrishnan
2025-10-11  4:37 ` [PATCH v2] " Gowrishankar Muthukrishnan

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