From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-eopbgr820074.outbound.protection.outlook.com [40.107.82.74]) by dpdk.org (Postfix) with ESMTP id 5B4DA2B9E for ; Tue, 20 Nov 2018 06:20:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GjzJoPt5ZLvpVIet3s5WHwBQZG/rmiPNnbgNtRWptrQ=; b=cR+38aHaM8W7GAnjU+xVWXC5aUOdojOMMkM/4WzitQnC5g8P5Ko5qQrbBBLnYp3F8fdF8zn6AupsF50Act3ipFxzRHG7zgKtbRADOJV1ZPxpQ+h+n7LYdap8wAl5PA0FBflpktMtOwZ2ckyEkPEZoEjPw7CDax8V5t4kGS6XrdE= Received: from SN6PR07MB5152.namprd07.prod.outlook.com (52.135.101.33) by SN6PR07MB5136.namprd07.prod.outlook.com (52.135.101.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.26; Tue, 20 Nov 2018 05:20:18 +0000 Received: from SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211]) by SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211%4]) with mapi id 15.20.1294.045; Tue, 20 Nov 2018 05:20:17 +0000 From: "Verma, Shally" To: Fiona Trahe , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "tomaszx.jozwiak@intel.com" , "Gupta, Ashish" , "lee.daly@intel.com" Thread-Topic: [PATCH 2/2] test/compress: use bulk free operations api Thread-Index: AQHUgFSzapXnu8VSL06xBa+UCRDNqaVYIKfg Date: Tue, 20 Nov 2018 05:20:17 +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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5136; 6:oIjrFwHywRuFvOrMwGGghsKT+dhwng1a2fy3CH3+Kzr91XpsaAXOBD1rU0drQr9w8+T1YAaTBCIPyzN2iRVBIVHuOyu679Obhg3kJPBfuBUOmiUW1POIA83vGX0kFePeGwjaZ9WYcsfiQ+2dl274Men9P9oXxEiURsk354REmMqPvv+AV7/DxJ3W/skk+0g4pPdk2clG51dSUKQ6UdIpLh4O2Six6NKQCJhqpd+C9KPnrs0vm7mE1FK0RtN+4KutQRrA3lTJlCPox+FKSx9vYeaKPXSuqUhBAixy1W982I7wIr1QKkzZl+u/Rpw0cvBsjX+5LfuON9sT+5QcJMccmByIRUihoDLPGhmlzzhsPdKdFi6OdWi84pcQGKnQZ3pZqa+8bBkykgZv8kb2bY8MgnzycEAbpvDfQoqkWvMTt6nSPfSkr1OwEh92mzAdvo2lx+nDISYYqRDhJV5ljOqRxg==; 5:o6JOgFyvIWcoHBDSfbT0mcK87DPnlSFvHkSwUyN4YtfWDGP4WoSUje7oAGesrKZBQRoY2jxcdWCmriXtJz5iTcpL6iTKv0er9uB2gF42VhRD9XYLHHyJgjEPM7zxaWta85xnZC64whacS+ExTpuPnclriq0J8AvOATazzvC8NZc=; 7:9evV/YQ8attyi3zHUbrG1UspMlXVsOTiyXqOHkN5vFIljlPEBul7L/uDdeXLncEY+ceqx2pOANqLnCehOQXEZo5TXOU0JprcAD0UpV2fwGVkU118ObGwKo0DZZYVNOTS46SGVQ4MaE2ISS76bS/wRA== x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(396003)(346002)(366004)(189003)(199004)(13464003)(7696005)(256004)(102836004)(66066001)(6436002)(186003)(99286004)(26005)(8936002)(74316002)(105586002)(305945005)(106356001)(7736002)(81166006)(81156014)(6506007)(76176011)(55236004)(8676002)(476003)(6116002)(316002)(11346002)(3846002)(446003)(2906002)(54906003)(110136005)(86362001)(229853002)(4326008)(53936002)(72206003)(2900100001)(33656002)(71200400001)(2501003)(25786009)(14454004)(68736007)(5660300001)(478600001)(55016002)(9686003)(71190400001)(97736004)(486006)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5136; H:SN6PR07MB5152.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: 490a674e-1925-4ab8-5005-08d64ea7dbf9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5136; x-ms-traffictypediagnostic: SN6PR07MB5136: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231442)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5136; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5136; x-forefront-prvs: 08626BE3A5 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1hxXWgZPqvtJ/H+D84nWSOmtDktNmZzy6rVIzrJPRtPborVSe0OqZGJChiJBpq4PC4l85ehgqvDCrQNDZe3PcHbDWOiZkM8Bh/ggB9/X6XIjlfngTn/OyFEKxlcoW54t8WmECF2QSKxQgCN68STcruufxN/Ws/wZArk44eLG1P7rl9cMknMEpS56Q98XlPS6u9rOiBquraEQt8Vx/xIilTpfWm0HsR2Zq6ZJqlHqzzzANj/G5d0+SjbHWqIc+GduJzvGI8PtirjBXoUFcyFc8lE9cdn4VXFe7DTZACp8pnuuHRqcVDuUPTqzu7EFsDNQ01rwRY0mW4sJe8lcpT2oYgd4colSZ7d4HaCD5BNOuYs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 490a674e-1925-4ab8-5005-08d64ea7dbf9 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2018 05:20:17.5487 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5136 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: Tue, 20 Nov 2018 05:20:20 -0000 >-----Original Message----- >From: Fiona Trahe >Sent: 20 November 2018 03:40 >To: dev@dpdk.org >Cc: akhil.goyal@nxp.com; tomaszx.jozwiak@intel.com; Verma, Shally ; Gupta, Ashish >; lee.daly@intel.com; fiona.trahe@intel.com >Subject: [PATCH 2/2] test/compress: use bulk free operations api > >External Email > >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 >--- > 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 =3D &testsuite_params; > >+ if (rte_mempool_in_use_count(ts_params->large_mbuf_pool)) >+ RTE_LOG(ERR, USER1, "Large mbuf pool still has unfreed buf= s\n"); >+ if (rte_mempool_in_use_count(ts_params->small_mbuf_pool)) >+ RTE_LOG(ERR, USER1, "Small mbuf pool still has unfreed buf= s\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 =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= [], > > /* > * 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); > > /* 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 Acked-by: Shally Verma