DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
	Jerin Jacob <jerinj@marvell.com>,
	 Aakash Sasidharan <asasidharan@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>,
	Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 6/6] test/crypto: free pools in teardown
Date: Thu, 22 Aug 2024 07:16:34 +0000	[thread overview]
Message-ID: <20240822071651.2403105-7-anoobj@marvell.com> (raw)
In-Reply-To: <20240822071651.2403105-1-anoobj@marvell.com>

Free the pools allocated in testsuite_setup.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 1491ff03ba..6079d10078 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -770,14 +770,19 @@ testsuite_teardown(void)
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	int res;
 
+	if (ts_params->large_mbuf_pool != NULL) {
+		rte_mempool_free(ts_params->large_mbuf_pool);
+		ts_params->large_mbuf_pool = NULL;
+	}
+
 	if (ts_params->mbuf_pool != NULL) {
-		RTE_LOG(DEBUG, USER1, "CRYPTO_MBUFPOOL count %u\n",
-		rte_mempool_avail_count(ts_params->mbuf_pool));
+		rte_mempool_free(ts_params->mbuf_pool);
+		ts_params->mbuf_pool = NULL;
 	}
 
 	if (ts_params->op_mpool != NULL) {
-		RTE_LOG(DEBUG, USER1, "CRYPTO_OP_POOL count %u\n",
-		rte_mempool_avail_count(ts_params->op_mpool));
+		rte_mempool_free(ts_params->op_mpool);
+		ts_params->op_mpool = NULL;
 	}
 
 	if (ts_params->session_mpool != NULL) {
-- 
2.45.2


  parent reply	other threads:[~2024-08-22  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  7:16 [PATCH 0/6] Fixes and improvements in crypto unit tests Anoob Joseph
2024-08-22  7:16 ` [PATCH 1/6] test/crypto: add asserts to validate test lengths Anoob Joseph
2024-08-22  7:16 ` [PATCH 2/6] test/crypto: enable larger packet sizes with TLS Anoob Joseph
2024-08-22  7:16 ` [PATCH 3/6] test/crypto: remove redefinition Anoob Joseph
2024-08-22  7:16 ` [PATCH 4/6] test/crypto: remove unused macros Anoob Joseph
2024-08-22  7:16 ` [PATCH 5/6] test/crypto: start opening brace in new line Anoob Joseph
2024-08-22  7:16 ` Anoob Joseph [this message]
2024-09-18  5:36 ` [PATCH 0/6] Fixes and improvements in crypto unit tests Akhil Goyal

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=20240822071651.2403105-7-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=asasidharan@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=vvelumuri@marvell.com \
    /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).