From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0040.outbound.protection.outlook.com [104.47.42.40]) by dpdk.org (Postfix) with ESMTP id 0C5B3D00F for ; Thu, 6 Apr 2017 08:46:46 +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=DIquxrY/v39QBe4kZFm91FyDfgfBWLjHZ9DMhv0QFeE=; b=XnD48SEn9yfXu6lYjsk7rWaCdfE7dGjJk/M0nCPtVsQLFIkpHG5WlUbNFyAu9tcdDQFX0+Y/W+uaqoWeGxzpRnl+UFiIHsPKKhD9lXZkKsQX5ZWcU8G8ETL757OZzrv5XYVUGAuQhigbw3zMbuEOrSZU7J5iONj5ZxFIhOfr3F0= 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:42 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, Santosh Shukla Date: Thu, 6 Apr 2017 12:15:49 +0530 Message-Id: <20170406064549.7966-2-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170406064549.7966-1-santosh.shukla@caviumnetworks.com> References: <1491382264-23489-1-git-send-email-santosh.shukla@caviumnetworks.com> <20170406064549.7966-1-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: d4c79c35-b4d5-4884-5ed1-08d47cb8b0a7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 3:uHdPGzqmzYM1tkCoQdKUcq7HRNodG6NPFXMd/TyTUXJVWSbaqF6LfabpmybJml0pnC4K6pY+XPOLh++AYiv68uC+rpqyCMkNaXa1obBDCfAJxvE/QuOZ3gipg2mduBm1PkwBpKP57101mjTfkYHL9eZ3wgZcw5vC8lrccEuhWx8RdcmVmExhTAgZu3VHhKNMKtu803rlTpf+JvYiYa1NrAVoP4yx9u/QsCYMZgOnMeirPboIIcdxMR7okwduu2jzrvA0hDjr+zOob+FImRk2Vhi0UeYYYVoLPiUNOlFCGrV0C80TkCU6mN9mx7LSj6yLB8pdYEkfTyF7g51VIJeelQ==; 25:m1XlRmUnvR9InhI0A5wV1qkrdVa5c2E26UCacJuNFlRBzO35RTM5cydxgmCEpFbYLmNp5uqbyiGwawTicjuchZyThd2y/xesN0Syu0OPIW5hR/pcNsjnG20s9xKy+D/arkNIKypXn/CJ6R2SgvUs21UHadhnMoArdvw5kve6i2zcIQbfw+wWrxzsEj+phS2efcVEQ0zveU98jFjH/PrSlwRMaS/DXUSYTQb1DSzuh6w43UMcLVTmVO6JwhxASvxHvUnBflw4+KJnQ/Yq0mRHk3J4sa8UtEWkfjv9hwl2j2MCaymtPDY+aJQTR1JgQhMjghL6RRYDbk6OqYx8So9GUByUBY/Tfjx4yDYozBi8UDQq4eEunTOIq6SrZyiDDAaTIDczC+RWS2OooQrcC7o2h7dbSFyzf++mE+L4ZbQFTsEMDdbwxKTmvPFeZ5opYFfQ0/fXFTnzCX4yloRdNYaMgA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 31:GNQlURQejpl4Jl0goqf69aHEHb9QuA5pHbNEUndhlB+LKxC7gFYLbmwZH7FtEHZsGUdKX0nmgoUvXO0v5gopH3MMh07w5HjyroqrAFhYXy4Ttn8sK91vNo0CCDIUiMRgLKbD9kvsY/iR5sWlKJyC6TpjULsbonBk2pzP5UPtJ2gcq4b8xGSKzO9Bwr5kDQbtJ55tz5q6Grlx3J6/6QpXWT/9G0kTNO28tWvrUo+VEH2fZZLSGL6IAHlLs3Ahrt81; 20:eudEoKF/GNmKwULdjsweODElmQTZ4P5x0SII304lVbk3Q375s6C59YXP79kUIVHRrxXCXEuoyKK6zLDA+sN79gum43UbzvOqqTy5jlwt/wacU6FXE3GFsuqKfM6kTdKEFE2drUDTPKEbMHY0yQlJYASLFjWDZ0dJC00q9F54EWoQrFkycjQcy6ILivGUgJDfecSjYW3q5aHXTqpKQQWpMnC0MpHHexqBwEcGcXYihRdDFqxRRwazrYQr9ceKAGzrNcTXBvQ2hmD9x8NIM+NgB/DL8GwzHHtGL7uQug66rkWx/OhiTW9iZQxzXdNn1JphLlW3QB8ITzj4FLHJbz3WQfPv7q8xwmU8ZoswyrhupuTsnKeC7yVhZnbKjvxFZsfxajwQc3su/Yd7mApvZufe5Sxt3DX7eSKD3E/dQodTku/wpxUnsnq5LN1TI4gNjQ33KUXC0PdhUtAC70ZAZvbMLcoOB8D5z3f+WhoucLU7l2B8IoT0DCGJnrNXrMnQXtxaiB565/YgIn0TvSw3I9XlNKTr0lMIWnrRXakbSgEMA7+tTbTJhp8bfV6u47J6j8GV0fN9za0yj7VdwPv/HxJ6H/hIc1vEPN/OMkvb89Xaxqs= 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:s6SIc2TXOnVm2vheKWkBHmUdMQwFlOoVmRw1/gTBypEDPYDOW0ld8dzoDpJqSFaZ2MIp3TygzQY5LrrdFo1F9pwhCdjKJAPA4jq6yUtKMylRdB10LcqoZZygvMNuxGezqMcFMqZaQeYBzHKlKXBiPaGG3yORse/KCD054nf3aY0U8WLsLpi+Ze9rvKAKp3vFZcNeZb0+13UYIhh7ZZsuL17rU/CkNbGN7JIQMCUpsixXij+GV/NLMHAisxMnny7aGldIARNAbfcHqEhPcl48zBJbzXWgtmmvF6D2V/biaGl+KcaqA6n+Ib6+Gl9RVomi2rL24WKh5vTEMVBCE1VLatHAuPSoOMvN2GCzbd41wrd728uGlryz6f1k0KF3s1N/bNL1YhDhO5IZYMkfIEruRpI2esMyJeVFIKU5G+jsLqFAJIkTvocw0+a64F35MBcFIz5AQzYSNMS9NBf0Vg1PCObqjEjkSjYQvK++d79SUUvBpD9zcgJPPrF+zzA/9E8dhRqvYI8OKV12DLPbIUMOJIHIZoLgV2ofJK/k2TCPEDsC1ZjNIp/xJkOer5yWSdK21oby89CZF6YYKx2fYbCUMe6kr1M0ZhBZ4p+qRdVF+huDbDg5aQeZjN0z92wwChnVqu85/FgeZDpuZIroeQegCJMAt0b/D5cHZ9tOttsMvEt38rfmdTqFrc1w54JkTnVA/gI/r5UjD4IL1AlZCnks717tIl8D66zDIU7SJEY86Qf+qOoyXUdlUxI5LfFfAcRu 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)(107886003)(42882006)(6506006)(189998001)(2950100002)(6512007)(50466002)(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:F0Cz3lZW7VcxqttD9hxFMNJnwhzwilZYPx1BZmd?= =?us-ascii?Q?Gea9J7MU5eMbtQNkdPOqJ5bMzGOKUQJj4Qp54AXzOAwFA4slTgDvoQaazGkB?= =?us-ascii?Q?EY2VnnST53wYrqZxnHOGDRDDF65LGLqtlQNMBvsJytwfvtCPLkbpfLykSLTL?= =?us-ascii?Q?8lXqDD0Dgh7tLQ7p9JV7Ah12843vFNjbYExW/TfmR4y5fK37nH6gNv5AP3rZ?= =?us-ascii?Q?DbdN0LjBIjdqxDzmhg4EfXUKfrXd37paayKpoO+Y2WzGmxoeKGiiw3Riroq/?= =?us-ascii?Q?ga1SJDa626rFjdMmV1lVBIaxK8eZwgZYDViCV7rGWylaLzqoo0YE5YGCmzyJ?= =?us-ascii?Q?3c1f5cGR5dEKY8EB4kki2bnnobY3qBw1RlgltlGPRE88rbGd5fuwOcSYy7Fi?= =?us-ascii?Q?/s3915IcK2wNDPurMMjkpB3FAgwaNIP3nn2dODfmNcZu24lmEUrP3iQq6Ra8?= =?us-ascii?Q?k35Sv0wEvl7MNHBrNHG5+a7YL9g+6LEUlz8Z21C6wZNArYfdCP1xX3s6hEau?= =?us-ascii?Q?VNqicvlfmaPg5GVZd+uK8h5bQCYYLPexNL2IODUS9HGdCe9qcK971NEjPPHp?= =?us-ascii?Q?OKgOXtRGRdMPeTbGhH8TElH/LQG8my7rPBcyAblroBiN9uzZ/COyJoQToVpj?= =?us-ascii?Q?JpRjmuk9quXq7Wc63Fu8+KfvTkoC6UB2pHQJv8adqfnExyF113MdhJG2Hf9D?= =?us-ascii?Q?6qiAN2E2/bvb7408WtCbEKD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Xwf88VZPKzuZ7qYfx59CYiKY2IlefQxGTmPoJFFWKTgRMxV3RONRDsXAbztdH1u3Ys= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 7:Msrw//esygl1fEWIAoZD5HoKyXKJmD7UuGo0eZtNYZ6ZUZp6Q4pk3lFr35XFtV6W9c/EMY1q1AYoCUxnKnVcQwFGJEGM3iM7jASOQoLZT+X+QZS7DpvOtRCz7jQZJNeywD+tQJKprds+5pKbfMZ+ImqcIEBT29AWL7gX5IIQfvr/Ke+Z0UGBzmPU5jXOt7nhLtympcNGwW1vwV7fTlaLUdC6FHO3gXirNdJOzAjBuSM8vCG1DWSI4aWcif7aQtV4ha1V1hnnLbZTaSzxRPiMbc/ExBYC3F2k7bpkeztaWAKcYXtTGKqnof/qHIcrDOzS4ox7BHzAY3qL4P1OZ1UbaA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 06:46:42.2228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: [dpdk-dev] [PATCH v2 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: Thu, 06 Apr 2017 06:46:47 -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 * Fixed patch context 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 3c45971ab..aa67414bc 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,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(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 +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