From: "Daly, Lee" <lee.daly@intel.com>
To: "Trahe, Fiona" <fiona.trahe@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
"Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>,
"shally.verma@caviumnetworks.com"
<shally.verma@caviumnetworks.com>,
"ashish.gupta@caviumnetworks.com"
<ashish.gupta@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] test/compress: use bulk free operations api
Date: Thu, 22 Nov 2018 10:45:07 +0000 [thread overview]
Message-ID: <F5C6929789601049BEB7272E2673559879627B@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <1542665411-23489-3-git-send-email-fiona.trahe@intel.com>
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Monday, November 19, 2018 10:10 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>;
> shally.verma@caviumnetworks.com; ashish.gupta@caviumnetworks.com;
> Daly, Lee <lee.daly@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: [PATCH 2/2] test/compress: use bulk free operations api
>
> Use the new rte_comp_op_bulk_free API.
> Add trace to catch any mempool elements not freed at test end.
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> test/test/test_compressdev.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
> index 5d5e519..3ea726d 100644
> --- a/test/test/test_compressdev.c
> +++ b/test/test/test_compressdev.c
> @@ -69,6 +69,13 @@ testsuite_teardown(void) {
> struct comp_testsuite_params *ts_params = &testsuite_params;
>
> + if (rte_mempool_in_use_count(ts_params->large_mbuf_pool))
> + RTE_LOG(ERR, USER1, "Large mbuf pool still has unfreed
> bufs\n");
> + if (rte_mempool_in_use_count(ts_params->small_mbuf_pool))
> + RTE_LOG(ERR, USER1, "Small mbuf pool still has unfreed
> bufs\n");
> + if (rte_mempool_in_use_count(ts_params->op_pool))
> + RTE_LOG(ERR, USER1, "op pool still has unfreed ops\n");
> +
> rte_mempool_free(ts_params->large_mbuf_pool);
> rte_mempool_free(ts_params->small_mbuf_pool);
> rte_mempool_free(ts_params->op_pool);
> @@ -731,6 +738,7 @@ test_deflate_comp_decomp(const char * const
> test_bufs[],
> goto exit;
> }
>
> +
> for (i = 0; i < num_bufs; i++) {
> ops[i]->m_src = uncomp_bufs[i];
> ops[i]->m_dst = comp_bufs[i];
> @@ -961,12 +969,9 @@ test_deflate_comp_decomp(const char * const
> test_bufs[],
>
> /*
> * Free the previous compress operations,
> - * as it is not needed anymore
> + * as they are not needed anymore
> */
> - for (i = 0; i < num_bufs; i++) {
> - rte_comp_op_free(ops_processed[i]);
> - ops_processed[i] = NULL;
> - }
> + rte_comp_op_bulk_free(ops_processed, num_bufs);
>
> /* Decompress data (either with Zlib API or compressdev API */
> if (zlib_dir == ZLIB_DECOMPRESS || zlib_dir == ZLIB_ALL) {
> --
> 2.7.4
Series Acked-by: Lee Daly <lee.daly@intel.com>
next prev parent reply other threads:[~2018-11-22 10:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 22:10 [dpdk-dev] [PATCH 0/2] compressdev: add bulk op free API Fiona Trahe
2018-11-19 22:10 ` [dpdk-dev] [PATCH 1/2] compressdev: add api to bulk free ops Fiona Trahe
2018-11-20 5:20 ` Verma, Shally
2018-11-19 22:10 ` [dpdk-dev] [PATCH 2/2] test/compress: use bulk free operations api Fiona Trahe
2018-11-20 5:20 ` Verma, Shally
2018-11-22 10:45 ` Daly, Lee [this message]
2018-12-18 10:20 ` [dpdk-dev] [PATCH 0/2] compressdev: add bulk op free API 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=F5C6929789601049BEB7272E2673559879627B@IRSMSX106.ger.corp.intel.com \
--to=lee.daly@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=ashish.gupta@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=shally.verma@caviumnetworks.com \
--cc=tomaszx.jozwiak@intel.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).