dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>, Akhil Goyal <gakhil@marvell.com>,
	Jay Zhou <jianjay.zhou@huawei.com>,
	Fan Zhang <fanzhang.oss@gmail.com>
Cc: <anoobj@marvell.com>,
	Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
	<stable@dpdk.org>
Subject: [PATCH v1] crypto/virtio: free memory used by op cookies
Date: Sat, 11 Oct 2025 10:02:34 +0530	[thread overview]
Message-ID: <20251011043238.1508-1-gmuthukrishn@marvell.com> (raw)

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


             reply	other threads:[~2025-10-11  4:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-11  4:32 Gowrishankar Muthukrishnan [this message]
2025-10-11  4:37 ` [PATCH v2] crypto/virtio: free memory used by op cookies Gowrishankar Muthukrishnan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251011043238.1508-1-gmuthukrishn@marvell.com \
    --to=gmuthukrishn@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).