From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.46]) by dpdk.org (Postfix) with ESMTP id 93DABF94 for ; Tue, 18 Apr 2017 10:35:35 +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=HODxiE1ATc8UM3cE9OgdGco12LaiivfCDkXVpFJOUbg=; b=VAFNHaLnkNE003mnQgwPL0BwGsSAMoRtEKCHi2dpTV8WJwI3LTuoJiHZBsSGzUa2abdwRH7bgd4gGUBpCjjoTAxAuRyjX/OoYfO0OaKukZbF4GvriknCGKWbw4uVsx/lgx/yhrtAwxA1fn0v9HwRDXJU6ec12wwFgXB4AHJLv5Q= 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:31 +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 Date: Tue, 18 Apr 2017 14:04:48 +0530 Message-Id: <20170418083448.24743-3-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: 796ce062-ee01-4aca-e606-08d48635e1c0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 3:twJNNyw0CccJ3tAI+heEU8kuvtpUAV+4UhG+DKtEOsDiLzwVb3U1Wtaod3g6asRAsQHqBcv0p+Tjgjl1M/okhmtfZC4dr4ZZ/8nrPnOoMfRUpoLkp7S42zj8jhA4f6Ko8/fkTnoLV2djSGm2DiqlEt8o03z98zdbE1amPIFVcUtnLKuvoy2xp3C29yUfvPCI3wjVAbwPlashNjJ5MBGC9k5eM+ooA1oRF6EycEKS+DYW4wSZxYFlGlTtvqBNtRsBdKFHKt0cUlPtqFBpDESKqiro6vZ9g8YMX0IMJvAxZmBwjpMW0MhzFuHJNJNCn5nJkCGmpmrRYDci2b7WfdMAww==; 25:OQWAmRjeQFuXJM5lxLBGNlBgT0f4iju7QoOffsST7EzYpXsW5rSO3Ke+gQt5Y6+BUjBc37rCW7rqwQ5W5HjaS1rgqy+p1pFxidUkiPozpZ4HNO6qcNNIY/k911/ThQrC/p+KgiKrHmcjXmAH2bXph6zX7Lui2BsDCnZdby68XxFfzkSw9p8suJSIrADoPpwqJDz/J4xVdBIK6UgfRxD2ESk/OlLCDZt6gzO/OZ2HC13sHI+NrnaZdBTFCAKQTTbF9+cylyzqAEKxbq505gdn16nNjqC4zPbkDCBIy1VSF0LXvDOr4A41hW7EhlHjeZqphBG5XEv1yOuHBbd9pt7IwtwiUTD0j+xtfpyj7xagn6hR6hZUObvDGimUAVKgB3cV6w3tpfgFd+MaUXiXiCzucJu0dOoJpVnQtIcNUOnmClVIo7PAPlCDckegODgN4Fz5lk0Vil9YdXZXDC8sLVMIwA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 31:zJI5i8jms1s4Cw0Z44xhLxX7Ps4KZ+JM7iDd/YBm1NpJ+DBl1r0HZFC8ssuCBWCqFVimhyQ3aQAjC1qSIJQ60Ve6FHwvkPMfmLTiFHcyO5OQDAyQBG3pYf2VOb5thkrXwE23eR4eNPDTsh8MBOfgvoRLnH//VhAiBD6CGsazxQ2gVbTooJiNY6SQTlDvINcVf4zhaMWtqwSsuVurDQ11tWLzhsAoLHxz17rRlcsgsVY=; 20:jJYmRYAhOsaJSYLqadWsjyV3iTSZ7nuk9crzl0oAog1/BOpzLCLuRuMd2vliY9IDcyPgtXBrniIN1m0G3T/3f85izhoAdknHBQl+vvQ4vah8HSx1edy7ck2U3KF1f3nOpzYIykFXaEwDw3Sx6cjrxOPhspBh+EwkWt73L6zocw7p/jJDDjxIKlP+EMvp2vwcEZ8aO8Wm0Ap1MWiGf/iTxm166y4mDiMTz37UnZcngrSPf2PoP43y7LPInG/BADiikYTc5tS/8DG91rk3EFP0YFLkBU2NI9GF/sVqf8gmUo2nhyAscvDSmn2SKVFICQaQwazsgOfEqVFXhVmt7mDXhz8+Kv0WABwki/ds8e/ZD0KFV5Ov1VibXOVCAOxqc6ov/GzjYMWeUiwec1c+Rqog8r7VyTxDa7q81jsIobH40gURo/qZHl/ke7wBh36Yrne77U1evTXEhPITd5veoaNz/EXLfJTVVEDNjn7O+flw5zrgrkrjNO9DZwGt9sL8z8ByZmeMyGAnCU7fmCpTRLyr7dRtjWJy/IxOF42ZcrBB4hWipySonVPXL1XW+eDzNUxHBRzk14quZ0iyTPXLlJV+j4wzU/EQp4JfN1/L/96u5yY= 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:KcG9GD8SpUkembxcs2sOSVGAFvtOapdg6frj/60kL1erjXxQ6/ThHb5DB9lN2wSoE5VU33m0Akn/AC4p8enmI0D3FNwpqZm3KCI2v+XU9AZ6TwfU0kyHBkyQ92vrSQjdAYLEf4fMvYzhhTnh1ClIqP+tsS6mX+Eg1Vbxs7YQmJVdAfz2W9lmo1hsnVi8abnNtAancNgnRoaWtWg4X0K5v7tbHYYjyW+VZyRyo+qmQV7q4q+lVNYdKt0KLKAdFhY1PQRHKgfsVx939XDxKTRN+2AMwvEeGZJDPzYL19JmEWLyS66wLkm4Fda5Ct1INaBDRNuzcv8s/50KqMsdjpuoNEYy6m/BQjp+S9qTGVm0rmu6MuN3JKnutNR+oO2WhF3nzK2fs8ElYrDhoP+/GR0d1CPXIRIqYFnb4Fahli1+4spAausWDTSrUF2f6lb6m4rVKRaiEezCnD9Q6x62HgC6Z5eYFMXqi7h2Mqmy7P5mEqmBFc9+aShMwfSmFcF2s9dw6PM1psumIhOVAusVNZI81sOIRmSx/zwrvqTaoMlYv9wWVJtUY7QfhXtZ28rHT894PSi6yTyhFqXq/IV+iBnh7K1xgdVnHPcKd29OHtolnjPmiSMgSf6l3zGvL9CVLo2v1PrnmPYCMEKRcq4D9WtYtrV0Sbyvw9IAM0E1LzapALWDarkuztnq7Mtu0R8Md9yVxPe7rFsrIRdTq+Gv6i9P2r5A1kuCTAnK2512h98oGSCmGrUaqOOfwQF+JnabF2QB 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)(107886003)(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:32lCEsj//9BJcADd9x/ciD9iq4IkIntyXIu4SAi?= =?us-ascii?Q?Q0iSulYbUT0jK/Ztlc8Zdeosek0Pl7/tmtgbloSOVtstwG03X791W6oCFdel?= =?us-ascii?Q?27hAySCkMQFAEJ4CbyoWwGAul3Va2j58ixsYdMvIh7RDNxv9bZSufz4NXXbV?= =?us-ascii?Q?8eEV27HT/0i3ObNMX4C7QXIQT9kfn6Nxq1ZXaptL3jj956QP/aZhCx8XFX4I?= =?us-ascii?Q?BpaojXUynQHo1NxfPDn1QuWwLVDfzOfnyQpunZ501O/JlT4EonGW427K3PRC?= =?us-ascii?Q?u4SaoaM+k3/BUYhzGnPs6BkfwJv3Sh1OAXlGwI0fLuvtYQam1cGYSp6wXcuB?= =?us-ascii?Q?UZVnR1RHwCLl219caCETpEbZ8EC9hZDMPP+iVPdPAjdsgPoZvFVY3EYIk/oM?= =?us-ascii?Q?v65X9YNSh72fmQfwMA98QbEPqfXfuazUv2Yj0aIaHBuIrMYyTujKR40J4rQM?= =?us-ascii?Q?mWS2CKN1MEiLdaRlXKojLHST16kiZ1SulmJnrXT+WKP3uWNXtFKs2HprgX73?= =?us-ascii?Q?KY4ZOog9NRNsyMnFnl2sqw9/C/0O1N/LF7/ECOsTY5lUHvtIM8kxjJ1GuprQ?= =?us-ascii?Q?ypMpeVeLB+aaV0cSAXzG4P3Ix1DHCrtEZukNEua3BfbBLXwRhoZbMpv1QYff?= =?us-ascii?Q?vMKAVsv/7ow1OI57bnPrGyRLELvj7xoqQIiEqgPJjojkA8seP3YZVZIIA2hb?= =?us-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TNE7v9EJNOftm0WBd6qhdo0xyYgLkuyrcKfoLocVATGZWOQAtlEbgdg1Rz+leqzQ==; 24:RRQK0nDZv3RN3lXSKEHZWRpWmjoSL5ntE8NGHN5eoS/X1kg1Qs1dKGqLFFMQJzx2epndSfbPxf4TnOs5XAccLZtU71LZ3pkK6F98CrvxQtc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 7:Oev7sQx8ZhOCELEpOGF2qk9EQAWaMMlP10VFwY0twaRCWKZbajD72CQPgFVBfNCt5qEKTLT4d/RrhXKzZfuf+PxyQPERfv13rR7PUU88Q/5DA6zUMn9Et4QD8+S6ETtVUpERU7bFgeBgB/JkRjz37Ck0TLh0YKEghRouDhMUIthGanZyLFH/6HrdneVJPbAD8eTpOwUuOAulWVAqih+KrL16j9SNkxJ8sD91OHbW71px8YUUkGdiCJdA8sVAQ9O+dtePkWbJ/egH17KJ1VFOWN1SfGAGKgsL+OeQ6GJl5erunHsl8Jwn461bSHvKby/5luKldrMBhvJXB6OW7RHh6Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 08:35:31.4148 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: [dpdk-dev] [PATCH v3 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 08:35:36 -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: - Patch context fix. test/test/test_mempool_perf.c | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index f29718dc4..f663e63db 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; + struct rte_mempool *default_pool = NULL; int ret = -1; rte_atomic32_init(&synchro); @@ -337,6 +338,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"); mp = mp_nocache; @@ -351,6 +380,20 @@ 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); + mp = default_pool; + + if (do_one_mempool_test(mp, 1) < 0) + goto err; + + if (do_one_mempool_test(mp, 2) < 0) + goto err; + + if (do_one_mempool_test(mp, 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 +427,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