From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0065.outbound.protection.outlook.com [104.47.32.65]) by dpdk.org (Postfix) with ESMTP id 386BE2BB1; Tue, 18 Apr 2017 10:35:31 +0200 (CEST) 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; bh=VEbcd5klXQnjGSSNzUKijFPGblua4uxy5VE9deKl11A=; b=B22fMw9e9IimN5YjdMAABdp/z1ZQQvfl2Tw5fTuPNUFxcW7X2C3Kqtf4Y+yKmWlSVtKfzLy8a0WzNlNCPvUPqU6giUdoxz2M/WrwDamTzHTH7b3kSI0+HnDkrM6pHGwW5+NpCJcKdFOrx9Iev/KGE3vUt7IPRbdgO5ltZn80dp4= Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 18 Apr 2017 08:35:27 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: thomas.monjalon@6wind.com, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, Santosh Shukla , stable@dpdk.org Date: Tue, 18 Apr 2017 14:04:47 +0530 Message-Id: <20170418083448.24743-2-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170418083448.24743-1-santosh.shukla@caviumnetworks.com> References: <20170406064549.7966-1-santosh.shukla@caviumnetworks.com> <20170418083448.24743-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0074.INDPRD01.PROD.OUTLOOK.COM (10.174.56.14) To CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 413964d0-43d0-4a0c-4ef0-08d48635df72 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 3:niUi75iccNaGwtMeY0PJuwt1QnrV1lsjLjfbJn/16w27zyMRet+byb/Se4dLIk8HxIo+8glXoenBDSIkWAaF9WPHzCVjo6U0LehgmhrrnpG3VLlasBYk2fvRgjkTmSwRDKPUBHXB9oZpPl+WgPVixLonGEkXxgFGw0l/XNXvKc0TxhJzj5GYo2WGWHWOylZgbSf9O9bdXG96e//POX2+sLkPl4Bgw3oAMy+XBnOMWcGqHEoeVMx5du6aqxC7EQ2+z55StbAV4ZwWQDhw2563fjq81pVq2mWL4tZMsRlwDj7stBvbsKOMoqfXbnrEIWw6RwvYb6K62XDMsxWGg0aGwA==; 25:IfC1XIMxPt3dxMtwCwIHuiZYHCV4r4x25o04nKuaIpDglmKNRwzylg7zw7jvDJfPeqq0oEk8xg0ZhQsgdR8ZqokdyosSCtYWwiKm/BYalkaDzkAXDok6n9CrgIE4lc7NrdyULhs3JNtMZG0NMDq48PwvYz1rqr682T9CEtJct0n8DX+juF/jcAPmyotyPRCLt2dTJwpt8YSBV9wXd1iUg1GB3Tl3CN5qxf70pxaEU/IjmVrG/6j0CTkM+UK3sP39ZkttpgDEUsxVWeANdrVGVsHx4CDSAJHLLCCSJrzQJ926k9AgUQge9PJxfr1fg57stuUFP43+eKtIOm6JnVN32Exi6wj06u1OldtEjmuW5KpNkI2NhsEP5DhfbH73WVbI2hErBHQ02mW0pMrWe8n0AP2gfkN65CAFWy4tubApIG8MUec6Q8Dpq36s5j9aHJr26bbzMoyPMaZxZZZbJ/FUHw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 31:0JWbh3XuVBfezx9nZIXoVF1l3cguoEAmPrh4q/QK5U9wPi0yqgrUGONG9RBf2vaqn0RZL0foc4z6a65O7rjEWkeiYjf1SnM0aJ5y7qBsXDSs1B/hnGvhPyzhxmDbJZPXd6xZW49M+77yd+rOxyNNKvL/v/2AaHeCK2kgd9wTAn6HcYjOssNxRbtzinPHvQukKa3PEffwyuwNT03FHXNLcBik6JfJ56uZC1LgMIywCq8=; 20:PDKy1jjQLvkqlI06cmUO9oIJtg2rp3bzrTfqlxsS4Iz9okbPMMh8ik8nCqvSUbyjXLGAGA1+FgHhPTeqKNvsWOHXCDWXv6yS/zYSSEaEVe/P86H4DdNIh0aH1FngZK5VAU4Ag3s4NSwVcaeQ197mzdD1NGVGPbAFW1BviPCdBd+Pl7/tHRePErzXBytl0gUGkmDO3Ihk063AYv0OoVXym2u+HlEd0t4nLRwUqbn2C275P/EmSQRBjrEe7hFdCGaoygd9Du6K95pcY3RLFdMq45gDouHjGBUZrHC7pxfswX/oXEyJcg961yXGHx0okcLwVVrv2xXJfVJaU0lBgo76Qe7lIbCTY+rGELL9xcBkI//uGyH6dKI1IvBb9S7QjolAbjwA5Mml1+DQhVkdOKelA4syjYX6KJs2rlU0u3KWPgVBdsOwozwq3I8FKMBLS2T9JVhgB9Mp/StGCHbXUZ7yFSiGRpwJxd5E366OzULQbmMxRYRlHS4ZlSfvIuMZ6Q8iUceGXR43DBTS6KZ8tP/jNOeCpb5FRlLQ3MiNSM/v6N8112wqqqbbVnLJjQt7f0VrqQbWNwY8oJXHSUMuSUyh9+NO6lWcgKPgD+jBQb5bsoI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:CY1PR0701MB1726; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 4:xrKQO15QDxcBRR9apTN0cPtqo9AR6V0GQNE4cvXntcgIcLBKDMrf6rOYSA60v/TYtD5m5UCeZVhNcEpmosMXxblwQ9PP7Zd/eN3ReMUGpAFIIgZZYCVk+7DyXZDTBCguJDNsYAgoKrPFKG2IiTmPWr39gbCAXJ687x2t8bTQtXqNJEq15EGa4Q6CX+7dbUFGTFnkNCHr+l6Yryh/46yIHAwUP3pp4CaUEJIbWK0NPHFjG6Glt8/C1BRo5sCyGQ1nPa/OlHHNJtSKuh52lmqRWaCsUtk9wFExObMbg0EQ3GQthdeoSla3c1CTKncD4vTAx9hai2c60BdVQkx4VU3Xz4NhNzFYiVPsOWjfqbJ8Oat4Yq+pXoVQAak4FUGrXt4pX3IhACw3NWZ4MF9VfQl/xOJMg9/zwyBEhZJRKI23EQjy4QG5b73ZSNw2Pkmlc9jnuaarEy2fho+0xrAQcDSmtqGefnY4eh9oZ9ShqUiuNey2U4W03+mkRtqvXL7dmDQrC8TzrwpIEKjKkCMwPoC98h0qaN3/iGAnkZVH/+F5vJrHiENBJalbdOCsgCIojGbamaA00MZ3llTCM0bXWTwsSEZ89DnC+NCMH1xbUQjbddAPcFMHBplwb8TdlDBmPH/qkFvLtkjb0xyUxhDubqbghm85lerT0sG1tIPJQYDOedculLzBpTTLbMeAZ3WG0Mp3R2l0RIXE9dcf2eCYkj2UmIzFzTvH0quc2fWjNGpKhC8YooRxAd04aolKuTh9yVH6 X-Forefront-PRVS: 028166BF91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39850400002)(39840400002)(39400400002)(76176999)(5003940100001)(50986999)(6116002)(5660300001)(3846002)(7736002)(50226002)(33646002)(50466002)(48376002)(36756003)(1076002)(42186005)(6666003)(5009440100003)(8656002)(6506006)(189998001)(4326008)(2950100002)(38730400002)(42882006)(110136004)(6486002)(8676002)(81166006)(305945005)(6512007)(25786009)(66066001)(53936002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1726; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1726; 23:BYXOwEpRAaf9oB8p7hCV2zauMtiCkFpSHkSMfO1?= =?us-ascii?Q?SqQEi82eGi+Y5R8Pfj8Mp+CYal0OUd2gp5k4wThHYTMe5GXq3qwtTmQy1Zxm?= =?us-ascii?Q?/UM47kXybghdNhbNuy2FB39wKOp8SBJX6kjsb4OJtEM6wGkgTQVcMteqibdi?= =?us-ascii?Q?YjYIL3NEQw8nytTyx9tvm9O2itRIjWxL3sDc2bGGqGZN9y3J6JCze6/WmefX?= =?us-ascii?Q?sUri+HQOCC4BHYZct3ise5XzQuzydWWncELEZB+JdCGaaA3ImfMesdVKLJF7?= =?us-ascii?Q?NMafOrhwMKhyOcUBvJ6oSRz/mLFB9eGn34sqK/ax7HJYHkBqLKxIuzzJKU86?= =?us-ascii?Q?yFSjmG8OezeQs9VT2XWQMKCM+KYDOkX4TCx3/PjSrjdJJx/8FLL10m4hrFOs?= =?us-ascii?Q?LCWnHc72c175B9PzBL6h4sDbduDyJxs3mePxDeUip1JOZnotluA0P6/ZglfP?= =?us-ascii?Q?oLyo2kupK6z23hRiED+Hfrh5Vecmj9/01L6ZRuxdBNlNZwU/Eb4KotYzIfQ7?= =?us-ascii?Q?5Yv+PnICKtXJIPVZpZvAoMix1ghR/DhzK0dFWtJlM2aleeZfgAtznQdq2wat?= =?us-ascii?Q?GEIP4tWxNit40GbBwZBxWAw7+JC3oqUyxFiEyt3tSyUYM3AabEo4txQUMEca?= =?us-ascii?Q?/DFka0PVa6Vzacmovp7i1qaGk5PD2OAqtdjsTc0i9RTfs/TkPT6/t4s5aokr?= =?us-ascii?Q?zLzvjR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gSg4TSRaoKuwkZIzaG4Wflpcw==; 24:7TAI+dF0pVqBKHYN9XyRIXLdT4cUQ1aPtJuMUlD8OudWg+zNktAYInZT5rxGHwyQLSbmV4kXYWfr7N5K7+NGHOVx0y2limeoeB6kASI2tmQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 7:gjvkKjBNDfU7O3a0dGeLUPwKWvEg8k0rOjiR7kFaRdm/X6ahQetv3TgiyVqOlQtowfENjLAwUb0Twowg4fTbksVxV04ESCdeSHXm0SUHFAVIsLO2fk4ybE3HIcz2sznTOTmuWpQjsLh8NGIpXSs+OreXDxD2EWmBaSGIhxBVy4vwT6khiPWQ/59n+BCXB5NmZVdsbQIHikObXtdnnbeOdM0B+Gxokx6ASS72AW1hP4fJqvMfa8JFlNct71WIGKnQOha0yPgOP6/LJoF8V26HLQfshc9CtDhaUuW2stwYW6ALNoxRkTNtb7S5xZZrLhYEK9k4qLYwb8Yo8rHMKBDZIw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 08:35:27.1900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: [dpdk-dev] [PATCH v3 2/3] test/test/mempool_perf: Free mempool on exit 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, 18 Apr 2017 08:35:33 -0000 Mempool_perf test not freeing pool memory. Cc: stable@dpdk.org Signed-off-by: Santosh Shukla Acked-by: Shreyansh Jain --- v1--> v2: - patch context fix test/test/test_mempool_perf.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index 213fcba5d..f29718dc4 100644 --- a/test/test/test_mempool_perf.c +++ b/test/test/test_mempool_perf.c @@ -314,6 +314,7 @@ test_mempool_perf(void) struct rte_mempool *mp = NULL; struct rte_mempool *mp_cache = NULL; struct rte_mempool *mp_nocache = NULL; + int ret = -1; rte_atomic32_init(&synchro); @@ -324,7 +325,7 @@ test_mempool_perf(void) my_obj_init, NULL, SOCKET_ID_ANY, 0); if (mp_nocache == NULL) - return -1; + goto err; /* create a mempool (with cache) */ mp_cache = rte_mempool_create("perf_test_cache", MEMPOOL_SIZE, @@ -334,33 +335,33 @@ test_mempool_perf(void) my_obj_init, NULL, SOCKET_ID_ANY, 0); if (mp_cache == NULL) - return -1; + goto err; /* performance test with 1, 2 and max cores */ printf("start performance test (without cache)\n"); mp = mp_nocache; if (do_one_mempool_test(mp, 1) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, 2) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, rte_lcore_count()) < 0) - return -1; + goto err; /* performance test with 1, 2 and max cores */ printf("start performance test (with cache)\n"); mp = mp_cache; if (do_one_mempool_test(mp, 1) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, 2) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, rte_lcore_count()) < 0) - return -1; + goto err; /* performance test with 1, 2 and max cores */ printf("start performance test (with user-owned cache)\n"); @@ -368,17 +369,22 @@ test_mempool_perf(void) use_external_cache = 1; if (do_one_mempool_test(mp, 1) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, 2) < 0) - return -1; + goto err; if (do_one_mempool_test(mp, rte_lcore_count()) < 0) - return -1; + goto err; rte_mempool_list_dump(stdout); - return 0; + ret = 0; + +err: + rte_mempool_free(mp_cache); + rte_mempool_free(mp_nocache); + return ret; } REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf); -- 2.11.0