From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0083.outbound.protection.outlook.com [104.47.42.83]) by dpdk.org (Postfix) with ESMTP id 4D448CFD8; Thu, 6 Apr 2017 08:46:44 +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=YmlXDKy4SB4xfCWfjokN2q+Xr4VWR6BuYrsnUCmyTKg=; b=CYt7vnMGYwykKYc5K7Y53uVb0cjy0WooEHf6Mw5tZdyUaGitat3xR7CReaFjhPFDgm5c230Ob2NZHJJSVDpeW/xwQIUxkOmkbsw+2yj+e9CS1fC4/q97Gmy5LeI6XQ2hzjHUW3/WqYIiM7AHAUulrgVKgvKUy0mKA05fRyQd4jM= 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 BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Thu, 6 Apr 2017 06:46:38 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, Santosh Shukla , stable@dpdk.org Date: Thu, 6 Apr 2017 12:15:48 +0530 Message-Id: <20170406064549.7966-1-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <1491382264-23489-1-git-send-email-santosh.shukla@caviumnetworks.com> References: <1491382264-23489-1-git-send-email-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0093.INDPRD01.PROD.OUTLOOK.COM (10.174.208.161) To BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) X-MS-Office365-Filtering-Correlation-Id: dc265295-58f8-4c37-c7c0-08d47cb8aeb2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 3:KAKLnGTDB6eh9An6ItckJi2auGkjJI/nzU1QoZQ/8S5XaEBbBwaKb7NYQ65+pKrbTczh5c4dCk2fNDnkrO2pG3hyLDoNyUAn4Uo2k/yBLEplS4kTOHy+P4RtQfMtnuTOYmhgeXgxyYfQgJtaRmaymX3AsIZazPXyuWzhjA1jzR1xoLUcY1pw4kIegZZHYbAvMBJkRm6heI7E8ueXUeKKGUTAwdg9x3AFfqNOFPaxgj41r/rtWZLCfOzGw5ikSI0M94C7qPMarfsXUR1J676ixND/KLmewdXRdn/Yv2lj1YgLzZMZOa69Xbb5+YZY8kcj4xBYwYBhYR6fhJE+x3W80Q==; 25:qBzovJ6oOLltB50jKhdamiURZybSTxzLiLwbMmjgli8nnNyASoBFTClGbwbAjFptdu3nqSlPWX+NVLoqx5A7+Q1FvLvMUT3rYv3UI9y+sGlnA2vdVjkWkO2ER9HriWGN93ZOztn7/iH1oooHtElNdijSy8xj6gNI4wedVZkEahbTaJTBDuQgOwIUBiDjWpTIDUx0YjP6kTIu28t087hrGl0uRG4X60/Vm+K8dvQXSbKY0RDU8LVv8jIubCltupepwWRCtmIKHcsfL+WHM7qKJa61MJBHTY6DHjtdRBBwRwQjnpkkt/l0nIqPkKr7hM3ol+qFyiquS3Ui81DgWAPUxlq6NOwTq5iq+m/Pg7zBz1qnLDgm/lUM7/5t2oe3ACn+dS2vJI7GIini2mEQzSD6cy1JIVJ6fi9dGX+L5rb3lxOY4JpXy8PXtO6aYljGvpNNmeZ/NRSEqI62bx7zbJI3BA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 31:iMaVz+0dctoD1pgs0olVHIRvkZDb0JNE5iWr0hxP+QFv+gnoiXNZdD4+MMlbKW2ZRsSMkOmAQLoEfR+lZcXqBpcYi8PA2+kYfyz9hI8ruHcBcEKu4I7qYpDHqBhPRY1qL3Ejly2yqG2x7vclLP15d3ltZBq2XOpuEfH3Hh/pz/UGklUmK7NRN9OPYEmlS4/f8AGPEaAgsSpWwIzrjynivT2zslmkcNw2rQshIG38sc5CFs/+lkRBUfiZyqIQfnEt; 20:sN9SwIyv+UIqKvKSBpVFImten/qX20Vs93oT/PvZQMcX/N6wqcRgAEmUPnwGgotTzzstRhv/w3hz/qG2uPxnfkLfAE0/r65pveJi/Td/btORfAXLyZIT5oiBYdHmSkkJpExMrJIE/Kb2b1uRiN2gGui/8/pwnfezbX50JHjgPTEZUbbz9vMu+K2C+tRhejj5HIdv23YHkOqhjocPoXvZr2fdbxGdRXnojg3Cfk/YtRzzwStXj3309BGDw+JQRZw/qpqBMUvBTff9+cMOWuzK3vgOKg+uZoA+mLJFfJhyX3m6+Bu5pDGbjcqrT1cBAXo9wwXHsHvmxUSMb5vpAU8kJYAPZTeSPTj+pewkGSAP4rmTIKAh1yVs24u5nfa8fxfGCrwPuPwrDQ7n8RBa7lX7rfhR4Pepp96NarKcwbm5+nl+ZaMqS3Ug+Kt+klYlzw5Cz5QLnYNYhMiLVLYDzR0iK47VTDVjMMhtn6+0jCblGf7LMFofzj0zpItsJoxYGqE2q0/ECHTI+YPuo/Vj33/bbuaNy1trbH2gOBhXqEeV9b9FPPDREfHoLogrZgySwuxFnvv4Jun5Fa/oODQJPZF2mt/uQGudWcPkJjbEc8S50b0= 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)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:/q+KhFKwQmXNURpuQKnpS66ECNO4zZWI8aQ+eJsga31+nkTdWlXT93HbiEiZ0KHgytfUP97PHtP4bswx49UKaX6kKs1YA6RrsHWwZJkim92BuTgl0UHoKVYsxZaRs50cZGH8FPGk1q/exUQGWlrdWsnR4R8OJ7BxQO8g1/Jc8FIsBvWw9RYD4hio8nvIVURd9mY82pQO1THRVBWtyAbhcYHOoAe17FsgGEP0tfmKXbLq8vIQafyMnyXlLWsY1ui0TrB+bko0/D58QPFWDDiq9wZpLZakPMvroN0A13HL0xpVdRZNlVYXZ1Um87fod2GjzScHYcO5klHz4BvziCSmdtjMzLXc2qs5epXxmRaaQ6Nj5uvPqEqaPawEI0omutgoW4mDD9di76g3NSr8HtkwDNK4WCZzJVwIWoj+KKFsvXgXc946O3FEvmiajdgSkwu9Xd1UQb2AEgF/Uwk1dVGuVb506m2OH9EP7XBgk4OGqNcdilYTBLykKYgxdXqU/murbfPMU/8lPHG3JjFGQAaCcWBDZquBH7PLRL5l0+SvLzX9gqF6G2qwxlN7I5SkVICmTZ8W8gu4jbCTnkRq6cXV9WmFbz2vzvym4pa1whPJbLnZEciF8l1lZNw0J+BHgCpgzTfowe7arLiilu87v5v0L1lCRSDJbU22jfS2q98iZkOeTN4J2IABhWWvbVp8mZVANe6b0f8G4TZiMoek1Y8STmdocv3zMXJoh33RoO3WpVIKQobjwQcklCdzCYZFV65b X-Forefront-PRVS: 02698DF457 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39450400003)(39410400002)(39850400002)(39400400002)(1076002)(5003940100001)(25786009)(8676002)(81166006)(50986999)(2906002)(48376002)(76176999)(6486002)(6116002)(53936002)(3846002)(42186005)(33646002)(47776003)(36756003)(4326008)(8656002)(50226002)(42882006)(6506006)(189998001)(2950100002)(6512007)(50466002)(6666003)(5009440100003)(7736002)(305945005)(5660300001)(66066001)(38730400002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1721; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1721; 23:Yjkmb6TQqtpiaObp6E4xViD8Is+W3cRGJwDPCJi?= =?us-ascii?Q?cJO88u9XtXsTvM6cCOnW9XrCJgUeg46OWir5KKgiKxx/J/g3Zf/TNijxLWrK?= =?us-ascii?Q?fphyJLuAUsc5SkdctJpiDu4aChxY5EukBsGbEtOAJb0ypaW5HdWiWjZX8r+G?= =?us-ascii?Q?bg1D2X6YbcWzzGKLmzomJvxwmiMIRWijgqwchTxFXtFLHKkRF3VRe3Qt8QoZ?= =?us-ascii?Q?zZ303q2ZhVntfMa8DmN7hF8z3XY+m/fgY8hTXbrALsw55Xouk+Mja4wSet1W?= =?us-ascii?Q?DpJZ6dPeYNJLwIDEDP3Xn1Z/ZgmeC1hTLBSPDGl3TQ6EYbDLaS8/XKtjPVFC?= =?us-ascii?Q?M8/FJGJwgQlSA1L5M5yJk7xVpz/UCCd6eAKThI1el55U1vsMzmIqmtB2O8Tz?= =?us-ascii?Q?L/t0jR+i6KPuogrW2OxM+4TmMmKZJVpGjy0td/KHXgVdHgfKIwTaPO2pdKik?= =?us-ascii?Q?4aTO5F+P5bwgcnRXmU/sv9vOy7aLJ+Bo9+O/yYQ0LJiLAUiDZULX27QpClfy?= =?us-ascii?Q?7XgtqbM4myAutdL0bHSzRnPXDrEqUO55g/AuqwLjKFUqRQDJVAcI9ezY5Erj?= =?us-ascii?Q?Vh9J5rUFEZUs274E3Dn2XUI1ncc3AiDO0YoYCd1Grm2BR3a5BRcsrs7m7xSR?= =?us-ascii?Q?+fG+AGzPMaTiJsLjDIrrl1M1YzYeEcTsjbVeHuZYkvR67yetwTxVhz8jtbfh?= =?us-ascii?Q?uvMSeH7G6MbX3WJYh0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j3C7iZHlvthC1BRKz5D9LMCvxVUzjPkrMuiA6gIlyiabSZBsoZ4Iosp9fGVan/nQEeUfiVy4fsn1/ttSTbqCbJ+3vnlQ9a4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 7:yPtstPtHBj+AaSnMR4Orew8+e+T3yQSHfh8bSUIHeHVBhA0caz/m1dzXD2j+xfz3UMOBUha/xDm6xLw7JOw6ITubSnAXb+ZtXdvHph8JBL3wkdg2e1iICGCi/RrMqaL8AL/egOPpQXtf3PP8SzCm63OoYzB/uvfvAp0TxHgst95cUI4dDiLi2MHSIF7BOHmgaclkSUuHKyGLwT8Lmef0ZydGCs3xq/evHu5cYJKFzso9r5WA/E8KGMYk7lvfoW5do5qI8SOXqCfqLX9NgXDIz3vR63b+HnoYVY+CiT8W9Li8Q/9JjHqduE430TUiwHy+YF2B9+tuUcsO21HEoqjkDw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 06:46:38.5879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: [dpdk-dev] [PATCH v2 1/2] 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: Thu, 06 Apr 2017 06:46:44 -0000 Mempool_perf test not freeing pool memory. Cc: stable@dpdk.org Signed-off-by: Santosh Shukla Acked-by: Shreyansh Jain --- v1 --> v2: * Fixed patch context test/test/test_mempool_perf.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index ebf1721ac..3c45971ab 100644 --- a/test/test/test_mempool_perf.c +++ b/test/test/test_mempool_perf.c @@ -312,6 +312,8 @@ do_one_mempool_test(unsigned cores) static int test_mempool_perf(void) { + int ret = -1; + rte_atomic32_init(&synchro); /* create a mempool (without cache) */ @@ -322,7 +324,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) */ if (mp_cache == NULL) @@ -333,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(1) < 0) - return -1; + goto err; if (do_one_mempool_test(2) < 0) - return -1; + goto err; if (do_one_mempool_test(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(1) < 0) - return -1; + goto err; if (do_one_mempool_test(2) < 0) - return -1; + goto err; if (do_one_mempool_test(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"); @@ -367,17 +369,22 @@ test_mempool_perf(void) use_external_cache = 1; if (do_one_mempool_test(1) < 0) - return -1; + goto err; if (do_one_mempool_test(2) < 0) - return -1; + goto err; if (do_one_mempool_test(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