From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0047.outbound.protection.outlook.com [104.47.40.47]) by dpdk.org (Postfix) with ESMTP id 7AD502FDD for ; Wed, 5 Apr 2017 10:52:33 +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=z27BgCOR8My3vqphdqm2CDX+0b6396b18xlkt/pQQYQ=; b=TuIsuipO+6ruSem4Cmxv6LM62XeCB4J5Uo5QPTIWZY5AGVqILlRanq2ETYqqGczb5ar89vfE/Ya6wIyWho4Zr9hb/QK0lnsuw3J8CgoeaNfjX7Quhw1s85qPCuyy55hIBUdwXnpsYTDEtkcu4Ac50BBIYF8XYZj7mFPzuV4ceHg= 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 BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Wed, 5 Apr 2017 08:52:29 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: shreyansh.jain@nxp.com, hemant.agrawal@nxp.com, Santosh Shukla Date: Wed, 5 Apr 2017 14:21:04 +0530 Message-Id: <1491382264-23489-2-git-send-email-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 1.7.9.5 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: BMXPR01CA0011.INDPRD01.PROD.OUTLOOK.COM (10.174.214.149) To BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) X-MS-Office365-Filtering-Correlation-Id: 720e7712-8b9c-4ad0-5bd8-08d47c01187b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 3:/uicNbTxwpfYYmyfwG1KRl9p3Zbxl5e80E8GLyKCiumAkN+Q9EILI3vU0E9HcYTKLhIvIxiZzSyuUsYkhj9hAGAh750SlvWdSbMrG8HcpJgvT+A4b8dALF1qsWTv7O+j0ZVqcxvq+rlR1PoF7oviDlEgFpsXVfOVBs5Ktl7J3Eg0cz5YQ9xSykPsFsK/gKAUR40cdfvdArFWTbBBZsV8L4RGYncG7tbakfLLmeitSQqfTFAh+mYwVlrnhbh6WAyWSUASBPBiExNWWtjoHrbIm7Mqbb5V/bzxT4pHAsXvtgjUO7NvpFgvKHgfsyBfXJOKx0ih0Wb2Oh1RF9p23NHKtQ==; 25:jrm16wCU7ZP8QVV78Z1J6zV2XSY9mXB8tXr8jpBNXYe3t5+dgzemAkRiCIrPs47ooLadPZKmMuVZsFPRx1vN9MAaO82IGGwb1RiatmWFV4JdActZ4VPPMnkxS+SrkKygx5ZjKPW33+zelxMREfTSdgqnMTtlGRBsSpfq8btbfzGWI6/TYbFFVXZ0dtRvJbcEEblkTsIQqvcy2XoDiAr5DPF6NbmZ4vJyvIdp0hK9jhfr7i4X8UbMUjNmgMXs7SFFIRTl4nu+5t/ifs63S9IggCd80QqulnpccsaKkhqsrO8IrAOgtEvr64Rk4QA/3p2Knt4dPGeRNNntC8GSLafZkwZkIR/c2iiwFtauFeGdnZX6aqstyG4mKZxUqn1bzNDxEDqLjj0liUy3ji5VS3L55uf4TPhZW2MJZO3M41w5w3ASVR8hJVklSSMc/bZI9cuuGy3kCn7zQY/MeDaEQwelsw== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 31:vPHxnilL8tOHNf1k4M/Od2/v9kdS+ZJ1iyal0ZN3uJhkvUAAPMzuQTfxPbYYlwFS2Aag7sGq6kBWym+2C9F/nYYHZ6ZSVD3q5jR0znLJPZKId0F04TW1+79k5LiMRy/XVHl/a3sfiPmiYSFasxx3Y3gT8mXMaPO3V+2GVR4k+/APQIPs8g9zrHVDTLhHjFEMbVba+XFeNTeBRhXRr38SPLOgDfFd3ONtzlvTEhMwtxc=; 20:WtXysHgknC07KvTeJtNFzUpGB1FieRZOmkYu4P+ZeKMxGYGWKjgHFdNKSD8Mt3+S2VppGpAYFtv/j2E/n0mE+bWjLeHsC84ZGJkkBnjueyQAEqO2VnCSBcHXfkf0ZAZL5RGW2vGndLcyMBCGfAllt2sZ3tBZgoQ5bu1iE84/t8jAXKNg9943RXE5QHHawK0I6MxjeIyPLsCf//qUGEiaMf0nbFPprClKEiitHhAenrZ3Z442Nx8hzApzQVgZgvYl7OaLBJoTx6lPTyKNS0BRJ1Z91LWpmzkzr1t1ZLgg0mO1b+cOUUKHjJOwVfFPm4FlYCqoUlRzPG8fhAe+SGCkaZNXR9Ek9fIWLb/j1USVoHuvd17a3JhWP2buB4eWOq0gQ1nfUNPuad57KL1CWRaqYWxfT2t8ah88tJ+DI6gCf9cNZNh2cEeHtE4M8QfiFpckbXxnuxbYXKObHyU97bTVqxtGI3IoddEmodhS972YaJoexTdIGf30p6/A3lo9jvW0NOF7EieEvLQgfyZqG1PGWsYJr6KpqCnPQtttYMVVxNrqx4jLwhMJkkMf1lXjYBnj7kz/zNXYtu5qi6XrSFRfmd/mmu3AkImOyNJdPGMWckk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:JZlyMxDPEu3YAIpon45e7IfCPYfsdN7NPKoe7NJdVc3W8xj+AFol5BRKT4qqW1FL9/D4o6NcMtuGSkkLnPMquyQeJdg33P+KBg5u884MsCRC7w/utuIhLP9LbtuyXznflLWKh6n3FnpQGzXcNMsDljaSflRLgXmvL2OmcPwLNmZTVdDEiRQU3f9Sp5wurg1nGFkoKuPTVTjBCUXcCMGZnM6iyQBogmyvbNpmQbGi3Btv4HiAdZ02rMJ95rjIO1i2nvHbpkFxHF/Xnc9jNRP31Wk93Kr1cnFpEaD5JQvqZsCh7u6ZihhJueKH6PYt+Rw/VDwmAEod9wd8ZRx9Dpd+W8o0jF/hl48SD/xBFvxVmb1Hk741JfcnJL0ezdCIF92FsIik3uLZJzOPKWYgfF/LdoA6mOKywEe9qGw9CLzocW2PfXwjsWl1/JQV36IZn09rCfkeOwkn+K8YATPNnmYcc7wEYS60oCMTWfUw80NioaaUjsa84Y5wUsFdovQP4msieffd6ozF1jmmkgC7eq2zb1TRP3FXiG4StFzceR+/4kOhmP0m6lhxOIG3VVEbpcENJZikYYUY6HDBuZgXUvlJmgAkqYCfH/qbJQY88O1oqgkcbn8XVAgZV5drVR78qX7mGSUVDvgM5iyFhavV1g23MCrrNcjf+QxzMSL9IU/EOwo1VoN7FkUpmBaB3SP6IvBx X-Forefront-PRVS: 0268246AE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(39850400002)(39400400002)(39840400002)(39410400002)(6506006)(5660300001)(6486002)(3846002)(66066001)(2906002)(107886003)(110136004)(48376002)(305945005)(7736002)(53936002)(6116002)(50226002)(8656002)(5009440100003)(6512007)(47776003)(81166006)(50466002)(8676002)(38730400002)(50986999)(76176999)(36756003)(2950100002)(4720700003)(5003940100001)(42882006)(6666003)(42186005)(4326008)(189998001)(25786009)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1720; 23:2dcbRn1+ptj3c3n8N9cxN8XOKh/CN8g20nFahMs?= =?us-ascii?Q?6NIRaov4jHmdOdMuHSiY2KcQQfnE+aG+fqP7u46vTQJceRSgicgQOA0yOzMc?= =?us-ascii?Q?f8piZa1kTeND3I2QX6sCKGc6mOEE2BVzGEGfXZ7zTdQK+dkul4a1DzOUg4jY?= =?us-ascii?Q?kfIKemkaZ2Mn9g24f5Tqt6tuOA97HzhRDMgG+nCXL5GU7ZOk9nc4F79a4hYP?= =?us-ascii?Q?dG5cb3qZR5+/n1UuyaMn8haviLKm8RC4Vga0Lr1DDEHazP9nNVSnI7dRks9A?= =?us-ascii?Q?8Wxf2VEFjtmxwfMtaYyMQ2kt5MXKyHI4xFS7zFowYm8Gnss7+dg5Qdsm1kta?= =?us-ascii?Q?5iPbLsTnTpyZfHSq5FqFvecjDWU3Eer7cGqVavXgbHcV49OOIy4xJ/aFFy29?= =?us-ascii?Q?eevpnvRD3s+lmSzErlZa1wJHg7yLzMtCI1DMA0rD3YHR3icZRI/CN+dJGI14?= =?us-ascii?Q?QiOFPNS8VGXosup7krJipBOKxB0/hcNgMCuNyfDFHjiiUTAWcsQD8OywyxC9?= =?us-ascii?Q?iWBUa5mBXgdPKiX80T4yA7HOHFsll4VXPFAM3nnivfbZ9va5wESgYv/L+Ytq?= =?us-ascii?Q?CXPlkI3YChEnmABd1xfujI/9ohOlyiTL1MrQvwlspTP0AbytMvPhn0xZ3Z+w?= =?us-ascii?Q?CaTASMDh+n/Tp2rvlla2isXQu5hDIVSRcRdtUM+kFmqMfLEPkL0bF6jsywG/?= =?us-ascii?Q?h15U0ikp7pvUYIyHRFwjasHG8iR534Yh7UmVoK4SJh08iN90vVfCrPJ3DxNY?= =?us-ascii?Q?Tf9LFgu/Sjo9X6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NP0Rox6ABCTBr2qoCpzEGH48mgGXzWLT1Qutt+vKHza2hqHYItsVkwSVW0uDaj00U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 7:2aGL9B4xCNcbsZjALCueV/3efXEs8MrW1fvjr07aoevu7hsPRShFaIUtD+Z5gdhJcwMpeZQd4IDXpWUa7uIc23YBdo9jcxfhRs/sRLrUsC1DQOUyTTeLPiIXbedVxAkf0kql2+a2GO8O2z32dtq1P9bVjgfSLA53DzhlJBm1vm9aCs1j2WbeO5aTJHCBrnAvByRnL0S/EHBs41nBxX1KQTAJbT4UImzpxmL3tPMBQncy/YmTsCgOQI5aav4b4U9QsnAeVhcye3bmn6Mh3W53cGb9Q+Z/qQTQqAdRNnYqoqP5DyNiicP//R5sKwsvoKJ9LAzirXQDiBthwGKrR1Q2Aw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 08:52:29.3162 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: [dpdk-dev] [PATCH 2/2] 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: Wed, 05 Apr 2017 08:52:34 -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 --- test/test/test_mempool_perf.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index 3c45971..9c80860 100644 --- a/test/test/test_mempool_perf.c +++ b/test/test/test_mempool_perf.c @@ -111,6 +111,7 @@ static struct rte_mempool *mp; static struct rte_mempool *mp_cache, *mp_nocache; +static struct rte_mempool *default_pool; static int use_external_cache; static unsigned external_cache_size = RTE_MEMPOOL_CACHE_MAX_SIZE; @@ -337,6 +338,31 @@ struct mempool_test_stats { 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"); mp = mp_nocache; @@ -351,6 +377,20 @@ struct mempool_test_stats { goto err; /* performance test with 1, 2 and max cores */ + printf("start performance test for %s (without cache)\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + mp = default_pool; + + if (do_one_mempool_test(1) < 0) + goto err; + + if (do_one_mempool_test(2) < 0) + goto err; + + if (do_one_mempool_test(rte_lcore_count()) < 0) + goto err; + + /* performance test with 1, 2 and max cores */ printf("start performance test (with cache)\n"); mp = mp_cache; @@ -384,6 +424,7 @@ struct mempool_test_stats { err: rte_mempool_free(mp_cache); rte_mempool_free(mp_nocache); + rte_mempool_free(default_pool); return ret; } -- 1.7.9.5