From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D1EB591 for ; Thu, 22 Nov 2018 11:45:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2018 02:45:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,265,1539673200"; d="scan'208";a="88376472" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga008.fm.intel.com with ESMTP; 22 Nov 2018 02:45:09 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.8]) by IRSMSX107.ger.corp.intel.com ([169.254.10.79]) with mapi id 14.03.0415.000; Thu, 22 Nov 2018 10:45:08 +0000 From: "Daly, Lee" To: "Trahe, Fiona" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Jozwiak, TomaszX" , "shally.verma@caviumnetworks.com" , "ashish.gupta@caviumnetworks.com" Thread-Topic: [PATCH 2/2] test/compress: use bulk free operations api Thread-Index: AQHUgFS6m8D8mrjKYE+uSb0CPURc8aVboARg Date: Thu, 22 Nov 2018 10:45:07 +0000 Message-ID: References: <1542665411-23489-1-git-send-email-fiona.trahe@intel.com> <1542665411-23489-3-git-send-email-fiona.trahe@intel.com> In-Reply-To: <1542665411-23489-3-git-send-email-fiona.trahe@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjQyNDUxZmUtYzgwNC00YzQ3LTg3OTItMTRiODllNmY4MzQ2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT2J1NlBDa2xHSThoV1hnN1U4UGJLRlRROGRncUJ4NmhNT1RmY1wvYWVMN3dhd3lwK0EwWW9iM0p2MUwrdmFMc0MifQ== x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] test/compress: use bulk free operations api X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 10:45:12 -0000 > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, November 19, 2018 10:10 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; Jozwiak, TomaszX ; > shally.verma@caviumnetworks.com; ashish.gupta@caviumnetworks.com; > Daly, Lee ; Trahe, Fiona > Subject: [PATCH 2/2] test/compress: use bulk free operations api >=20 > Use the new rte_comp_op_bulk_free API. > Add trace to catch any mempool elements not freed at test end. >=20 > Signed-off-by: Fiona Trahe > --- > test/test/test_compressdev.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) >=20 > 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 =3D &testsuite_params; >=20 > + 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; > } >=20 > + > for (i =3D 0; i < num_bufs; i++) { > ops[i]->m_src =3D uncomp_bufs[i]; > ops[i]->m_dst =3D comp_bufs[i]; > @@ -961,12 +969,9 @@ test_deflate_comp_decomp(const char * const > test_bufs[], >=20 > /* > * Free the previous compress operations, > - * as it is not needed anymore > + * as they are not needed anymore > */ > - for (i =3D 0; i < num_bufs; i++) { > - rte_comp_op_free(ops_processed[i]); > - ops_processed[i] =3D NULL; > - } > + rte_comp_op_bulk_free(ops_processed, num_bufs); >=20 > /* Decompress data (either with Zlib API or compressdev API */ > if (zlib_dir =3D=3D ZLIB_DECOMPRESS || zlib_dir =3D=3D ZLIB_ALL) { > -- > 2.7.4 Series Acked-by: Lee Daly