From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0072.outbound.protection.outlook.com [104.47.36.72]) by dpdk.org (Postfix) with ESMTP id 4EAEC2BA2 for ; Tue, 18 Apr 2017 16:42:36 +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=tpW69rXTHfzsfm4rXGWotgkLOdh8Em74qR87YckHGhU=; b=NDvPM3SyJLsZb1Oj+LNzwcCiH0XOO4ImvdH71NwrATkaTpRi2kol4YitwDFBzoaKel/MfezeYo3sYuZk+oFIbVW1XIBLlQfdyfQXl0aRBU2mdmVldOKS2MlI1hnbRixaN2YNFQ1XBaPwZqV3htrs+o0idCDssUBv5eBhMg/md/k= 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 14:42:32 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, Santosh Shukla Date: Tue, 18 Apr 2017 20:11:30 +0530 Message-Id: <20170418144130.1777-3-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170418144130.1777-1-santosh.shukla@caviumnetworks.com> References: <20170418083448.24743-1-santosh.shukla@caviumnetworks.com> <20170418144130.1777-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0096.INDPRD01.PROD.OUTLOOK.COM (10.174.208.12) To CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38a499a8-7694-4e83-5c58-08d4866926fc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 3:0GQiAxxQpMRMLPOwWDyAzgM4z5+Bd1L4W30cyDz8/P+lUrIWLcbETmSK2L7zVSHi/HVwoRuZJe2rma8rxsd2LCw/rK5tuBd2A2WZGYKCSY1kCVrcIYSW8ULhbas4vVr6YK5xDbnCkoqGqCoulVK8TvfKNTymYvPlnYbNzKaOoHiuTcl7ifvAhPw6e1FvyU/kcjUYMSVytxwtVxPoZPZB0crUyPtDTB4FaJEr15vbBe99bPcx/9ZwEAkH/L1HAz6S0mrUrtRlMDhZNDSDcqFsoYgv6pyzAR7//b7PrsY87ovNcPzQbtaDn4HwXhR9lasEQ3X4+oT/6usvrq0XGt+lMQ==; 25:zEf8LcnOughdyHePc+u7BFlJvN6pMwaU1Kxcds8OwjvImZHAB5JaE44zVnG5ETkOol+ac+JsBhn+x6UOYZROOzgoPJjIro3rx22ClHB0+UX+adut1wq3DKsXGFrqQ1kOO4zXYPM+k4spqoglCXGvymlbe2kcKyBehwSiYLoMYfwcyCd5WGwK53PMdeFlguM3Sk/xGH+2p4fYHhPGmIiZo6GWeJiB1eIcAmM/nu1oD2KCXdfPtFzr7sKzXog5tt2svUSCZ2LAu6Px/mQJ3HCVZpYrwLeH98KxON+NVeGezIPOW8IsgX4t8vi2YXgZ5Q5tITWqeNqQ+G7vj+LGFsiLJFwajfkpSrFD+kN1jrayJUnTHBEsgva2AZaGwE7WozgMZ0hkB84sIuFUbmpBvx8zoBlaeWlXs7Z4SsAtvVot/mCE7uTRbNpNFZhbkZRGM0u6/JchXRnE0qGIa3ytByI3Lg== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 31:isFWKuKFFFx+ld3X6arxl4OscUeQ7MlzHq5e8tU3v4J3NkESZfSpwmZuXm45EYrwUpAKy+kMtzE9EWKDmDocrLh3cJ8YfoO4PsUd/48KTuFklUodT7cNbqaQWcP6arUJ0y06kqvU/UVeKok0IH/ZRONwKMXyZxcM1Z4ovCoi4EIhb9n2vWiv7yupvBU7bdL8IdZIWqPQh/PHY344LsVC95eSxHZ4IgfvyhePi30vAivGqzONQmRQOo6XbDCz/Luq; 20:hctO9TWo96I5m3h5PwwY1d+lC/tOvjKSMqyfQdL47oDVKVK3pMLVqP/KY5IWPaAudBY2IycD8SrOazQ6o7JocMXvDvzdExbk298H7Fe97WxqCl7kdDqU/TmpmnI4o8MbFFeW+2Fz3eAD3+Bb96no6OQjXYoSwIYCbNZcXeP+vy+YHypq6ZB1ock4nBw4Xen27+Uc0X5KLZAGEUj/S43gaMUqOObn9jOrVZZGkU6HymZnSnTFaMPd/GCE/VWw6lPfvwYaKLEnGxrWNkrVfvOUhCL2R9WZwp3Ampa6VgbMsNcAc+hxnsjrBwJSUuU5vub7BH0LXpTd+HUqzp65TYrxcQANUy8x4V3rwQYfcGLIopCRs4dz83jqnTwAvosKZmguCWrwj9PvfwnS3D4x+Y17XRtInpoRS8/3HIPLa1DVAJ3SoAEBPOBHMzZ1ktp9p3ZIBwMmrJeVmmpb8p4fpMSjJ0z+YPvUu+Fyw4fGTxUPaVWA/O2eS7npY5sfSqgPNPUySpV6YdAoqH5kqqOiG+TexmsMP6IHKekFhchm/6M12R2RFAn98JDQZUfkx99z6CsS/tqNGBoJr6AygY6MQFSSj/VTR60kIfcsUCNpJJOu7VM= 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:LK7Vnk2jH8gIQGDt3sqvzlFd8SxU+Cs8yXlLS0E/ybJVNrW8gSvXTP7TvKPzwvmvKY7RZYWBi/vrXSH4zV8aIm8pktvbhnLRwYir7mGOE6wsNMF+AsVz3z8IktSYX1XldZsc0AKFol/L/FLc/wY42npw+uVyAkheEY9MMRpjYjc4C9aunNz86JvPl0+7n6/qKGLExQtkGHCicp+jgc/MYhpoCcbDJDlwjQ0KF0X2epTWD3tW6eS04GEQgcGsXZPcnK5iz/TmsuiNAExzyoOhw0Od3TXKaCrS3cs4RfhjzaycUHj6PV8bZKQFysR1mb3vd8DbWYUZrnDzE5H3yKNmSEbFSSo4oqNPXAgH4kbYntMv+X5fFra7gQSe6Sjo24BlM83ij+Avi0CglgfsAj66aCYMrhFNloakBfzrV7tZIQjboKqu05v2yv+oAw/ML1OYeos5nO9ia/+PJYib9nqj6sgh/o/R7tmI7h/Q2ZrZojO9q61DVmqiNbDcFgtzDknVAW2gNDVeWI9F8+KQA8Ieql0NW0imPIAfQK3Fp2jg1nwFIDyira7w/goXn7dhwGDRk3sgB/x6ps/2dntn38leaZPH7WkRUrAtX+fMI6EEVrWPa+5ISyjj3FeuXeweCDSKo1XXSrrdvtbA2CHe4R5pZcz02Vw68bczFrZp/sF8C3y9XWier+YvzD5+qD331MRtcQrG8zUvb5toPA+jajenYxRzfvVR0j7ARYod07ontvKCl4xdRbqx8LLv8hwNQSsd X-Forefront-PRVS: 028166BF91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(42882006)(48376002)(2950100002)(50466002)(6486002)(50226002)(5660300001)(6506006)(5003940100001)(107886003)(110136004)(38730400002)(66066001)(4326008)(76176999)(47776003)(25786009)(50986999)(5009440100003)(8656002)(305945005)(1076002)(2906002)(53936002)(6512007)(7736002)(3846002)(6116002)(81166006)(42186005)(189998001)(36756003)(8676002)(33646002); 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:zH28lQV6Urtwhar8lz5iwWgFbNsFc1+1+UIFhI5?= =?us-ascii?Q?SYL21Uma8y+YajPanoJWR/6gUw3k7/cfawx8n39Mo2UzSQVztmtj9GPLpJeL?= =?us-ascii?Q?bVbrQWouSnkaE77+i+ONPNnGQb2rR/8dBTedGMusbsFG7Z0Iezgny0kFVn5R?= =?us-ascii?Q?4Vg6dgqBPXH36+hpVuCkdei9t/jU6EPLznz6y+OFiBG7eYLatKUCoCLnVBDI?= =?us-ascii?Q?0GlWFWip5we2R9sa5igAc7z4cXJ/c54tdoGQuiWwVSN5JiobEJkL1D/QlWFK?= =?us-ascii?Q?2AApij0IGShsmfn30ujgeDJMT1Y7BpHmESkg4u4okotEjc3Lxctf6IpDtOFH?= =?us-ascii?Q?OQfPFtxL68DtnKHj0FzhFzhle/05Re2ftbaoiI0+BZTlJhhCtvPlZxigAuuc?= =?us-ascii?Q?RCnrcaz1uWKqZqW7ozk6B8y0F5NMaodq/p7f2a/kEWOgFL1NipAn6VPGI0sU?= =?us-ascii?Q?vM7H4+GBoPjSFQe5CaeuMNrNygoeWZ5Xu5w0RpCe6nTndfDPayhcofeuOvhy?= =?us-ascii?Q?ceh0QA+hpmopkgMI4wwSrAFF5MTtMcs8vmtpHARKjQIZuNTcbzLfbmuo8Z1w?= =?us-ascii?Q?kVncOwA0UH+6w+kk6wyAjV/RHfYdXj/tnM72+rIJ6++JczkvbhWzHR+1CdG+?= =?us-ascii?Q?Hlb1TNIvHkNvr7nB6QN4cBEWLhwK0cHDXjG4YRJvUilwCP981Gq2BAujulO7?= =?us-ascii?Q?N8Q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sKsapG++Cxmu2uL8OcsHppAYeB6L+o8V1pJlz0pkXWTZP+65ilsbRBSVaLU8FQ==; 24:IXIgjwEO+11XGe2stHguM7EPBShoDeYFZiLd8wu9myaZMyga2eFmzG0k6rcKVCiVIWtuUwMiopvdt66cHuyGRj4d+5/GrCBSlaNMLAIOr4E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 7:MLXZuYN6EOcC5JDSQFGg90OGXNK8hAgS5ylZwBHjbjo2H3muHpXVeSPrL4BNZ/Qla4cjhPIQaa1RLqv7cKpTUMDkHO1VVMJHeFEFvVLcovVerA1UaSUDQ2i4p7eBrlduNq1DLMjH4cebIiW3B4QDKtf0yZLyinwhDGcuzAc6Uf66WibiUwzfmVgvbDF0lKZgk/PdCj2/LiaJWCBQr/z9M8dt4+JH/HsrdpQZT2HtT7H/HYt1ztUlWXuI1mlVjOni5EiZyHDT9daQB3AyjYGi6xM7lzrCSUn78IprrHIeKb8pjJq6D5D8b8eeMil9wkK3dzLlA/wT80MxMfVe/lQSOA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 14:42:32.5371 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: [dpdk-dev] [PATCH v4 3/3] test/test/mempool_perf: support default mempool autotest 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 14:42:37 -0000 Mempool_perf autotest currently does perf regression for: * nochache * cache Introducing default_pool, mainly targeted for ext-mempool regression test. Ext-mempool don't need 'cache' modes so only adding test-case support for 'nocache' mode. So to run ext-mempool perf regression, user has to set RTE_MBUF_DEFAULT_MEMPOOL_OPS="<>" There is chance of duplication ie.. if user sets RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" then regression will happen twice for 'ring_mp_mc' Signed-off-by: Santosh Shukla Acked-by: Shreyansh Jain --- v1 --> v2: - Fix patch context v2 --> v3 --> v4: - Done code changes because of [1/3] patch test/test/test_mempool_perf.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index 3749cf8be..07b28c066 100644 --- a/test/test/test_mempool_perf.c +++ b/test/test/test_mempool_perf.c @@ -313,6 +313,7 @@ test_mempool_perf(void) { struct rte_mempool *mp_cache = NULL; struct rte_mempool *mp_nocache = NULL; + struct rte_mempool *default_pool = NULL; int ret = -1; rte_atomic32_init(&synchro); @@ -336,6 +337,34 @@ test_mempool_perf(void) if (mp_cache == NULL) goto err; + /* Create a mempool based on Default handler */ + default_pool = rte_mempool_create_empty("default_pool", + MEMPOOL_SIZE, + MEMPOOL_ELT_SIZE, + 0, 0, + SOCKET_ID_ANY, 0); + + if (default_pool == NULL) { + printf("cannot allocate %s mempool\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + goto err; + } + + if (rte_mempool_set_ops_byname(default_pool, + RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) + < 0) { + printf("cannot set %s handler\n", RTE_MBUF_DEFAULT_MEMPOOL_OPS); + goto err; + } + + if (rte_mempool_populate_default(default_pool) < 0) { + printf("cannot populate %s mempool\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + goto err; + } + + rte_mempool_obj_iter(default_pool, my_obj_init, NULL); + /* performance test with 1, 2 and max cores */ printf("start performance test (without cache)\n"); @@ -349,6 +378,19 @@ test_mempool_perf(void) goto err; /* performance test with 1, 2 and max cores */ + printf("start performance test for %s (without cache)\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + + if (do_one_mempool_test(default_pool, 1) < 0) + goto err; + + if (do_one_mempool_test(default_pool, 2) < 0) + goto err; + + if (do_one_mempool_test(default_pool, rte_lcore_count()) < 0) + goto err; + + /* performance test with 1, 2 and max cores */ printf("start performance test (with cache)\n"); if (do_one_mempool_test(mp_cache, 1) < 0) @@ -380,6 +422,7 @@ test_mempool_perf(void) err: rte_mempool_free(mp_cache); rte_mempool_free(mp_nocache); + rte_mempool_free(default_pool); return ret; } -- 2.11.0