From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0045.outbound.protection.outlook.com [104.47.36.45]) by dpdk.org (Postfix) with ESMTP id 50BF51B230 for ; Sun, 19 Nov 2017 05:55:48 +0100 (CET) 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=0Ar3f8G/VFc5i3D1hOGGSDxPdx4RGAp4dQ5sP279Ru0=; b=ec2zJSeHRkfXBVeYTaoedMN4ruqrBUx1OfNvTOv0lsFfrqaNuP9PL72PI+cB0MD1NN5GDeTDvZ823wE7W/dUH5pmbikVX/33OjHJeGRDhaa1Mri9vtxgGE0SYLMbOdPYKgJBuOCXWjJJ7EhBcxMTHHOr+Kto/wFDDj8jEw4xU+0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.hil-sjccahw.sjc.wayport.net (209.37.99.82) by CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Sun, 19 Nov 2017 04:55:45 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sun, 19 Nov 2017 10:25:31 +0530 Message-Id: <20171119045531.25165-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.37.99.82] X-ClientProxiedBy: MWHPR15CA0039.namprd15.prod.outlook.com (10.173.226.153) To CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a95a247-5cd2-4a97-56fc-08d52f09cbc7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 3:y2QnVh0ofc+1dSgt7oSE2qoxa5Zd9an9+hICMyvakAzGFIQY4wL+Os6hHufQEcQsERcgz21YBZIRBrQSU+vFdb1ZBsOn4bDfd5RA6CVzMkB4CPeYZqHWOCS6iL/c8McNUekc0oOuFyJ22toSlnpN88p2RAt2yx+XD8/PpleYoAc3Qsv28ZWqRaft97qoRUtd5b8AC1Y8Pzqd9A9uas9yPtGAnDoDG+cPawe+A92vOQTY5ZiXVqpXQr/SwZI67YO/; 25:pBhmSt+Z+5sygx20SgdhoKCNLRMLZxcetyorY8Dqhay0GfUkOb5KVJodcH78fovzD1uubB4SER69/qHD8wS0U4jZz+p2mKQ3CI8M2OV8kBB2sLFhseKkPdvLG+qnQ8BsmDnpGiNbdEzoec2o2oTKaLAsO1hfaAS7ebzsVE7JBU7ky5+pv2LYSwcnlT7fHhq1eEAGU+Ys73gq25oyrweXagdubDT7qDhARwhYrvjMAlfbJwjcxztY4n33nVu58jlQs/d9q444zZv055ZLG2vD8Gd1+X4JIt9NjH/Hqc/6IkMsAr5Zfmx6cY6ysrsTcvMBkJWInE+JLbb+xb7xBRSomA==; 31:wAo/PLCHgJR2GPhDJmzyRfM8AgAgE81wGzHxpvszEZbqUetdYailXx+yzY6/RxZuhto1T+JS3vZX5MHo6CgYxov2CluAlxpkej/hNHLjxpyQOielLDBTUvame62jtrYHWLfirVmhkXQwqIlUX7WwPonCTJOpMNUY6iiQKKNcNBoE00WoudtjYbHEWy6CREJJGlWM5EqVMZ0xD0vQMYG2jtXXxAf554Y6ljVrvkJLTT0= X-MS-TrafficTypeDiagnostic: CY1PR07MB2523: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 20:yDpagcXGxdTwEzK4ef6qA6K4gaRJkx/YfZfQFF3botGTAUeTpcykFvvdH/g9NgzfSuSLJH9EkwrNO8c0Rsx2KonkWtYGDtFc7Hbo4q2yHd7gVCX/hi1K4/k2ZzYwsqDgotJGO1es52SSMQQQUzQ7jeiZ4NCBigtqRtqfX6eKKHEb+jnXv3aPFFwDvCN1jqmBUWysHz3Nwu8Pz9IUmtcO8tAktcc4uso7Y0dLt8EULM3Dap/1EaMtYlbX9Hova/0zWhoZJ4hIeHEqSQYOdzOrG32Zp8A9iON7fsx1BwTnIB+BpNOGNsLB1TEtMx2vNxMqXYwAFgqVtJGLVeO9Og6wUwuuRs3J4BVEiG2U6f9/USn5k3qde+M4WRaaTRBfcwUaTYiOQqt+6oRtsTzoKvEZ5BOsY1fkOH32UIGrLTau+aCkLW3n1BwBtuV7S5KsUJU6W8Bdz4n10Qc3uXZ+5jJhvPB3rU1lbBgqwJ/Ot0AbP9NC4pSCh0xOTFKqUtVeCfZ3lKB+cI7rXjKpJo4qxSuberDs9Z3DnCtnzQaAyshchAnSOK1Zlt1eaZDh7YoxqQJS/c19eGWTpYnjDcwxj+HBWIyasTjm/71T1G67mBsjTds=; 4:r4A/xPvRK7rKrnvQYQ+ErJMF0I1W2Q772RbuzWITXB78qhkEcNSlngW9I1BhurRSTvXgZLLO6RSzKpOCfFPdea2/38AG7z+u3ElVzYdgrVR6fT9+CJFtu1dlkH4vU04km+FN9tqDy8iBTj6P2CKEBmN+8kDgckEsNvoEY+A43BUa3LuS2KI8gb3U/ZWDqzGu+Bhylg4RKIPXbSi4b1+UPhqS1esb9TQe2k5XGD0XK3t1M42bm4RyC9cB6y/9/Z6UabwN6ypnEwGklaJaSgO9zw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(3231022)(3002001)(10201501046)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB2523; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB2523; X-Forefront-PRVS: 0496DF6962 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(346002)(376002)(199003)(189002)(33646002)(50226002)(16586007)(106356001)(305945005)(2351001)(7736002)(2906002)(101416001)(8676002)(105586002)(72206003)(50466002)(5660300001)(47776003)(25786009)(81166006)(81156014)(16526018)(478600001)(48376002)(66066001)(36756003)(6666003)(189998001)(316002)(6116002)(1076002)(97736004)(68736007)(6506006)(2361001)(5003940100001)(6486002)(6916009)(53936002)(107886003)(3846002)(6512007)(8936002)(50986999)(4326008)(42882006)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2523; H:jerin.hil-sjccahw.sjc.wayport.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2523; 23:pECOGmhOF0WYpfr0SyqsDp+yudxQ8JmQXV34suiwU?= =?us-ascii?Q?aLS87DPl/VtgfHSiz+ZnffCpJ7L/AnF2cOUtHJFLkql10T4HiGKcsmWtFgRJ?= =?us-ascii?Q?sWWWhZvRoDkA1h/vlo88D1CTRV2DjSu+dyGjYvybPr+84Kp31T5ios1+dhtc?= =?us-ascii?Q?F6xIwTTUNYfA+9NSRX1x7j4r4ReY+cH6KfklX8y3Jvxj+IhxciybTiZ1InQa?= =?us-ascii?Q?YzP2V13aUwuo8BLXnt72Mi5QwVrOtU4PfgyGDqJ2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PM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2017 04:55:45.9718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a95a247-5cd2-4a97-56fc-08d52f09cbc7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2523 Subject: [dpdk-dev] [PATCH] test/mempool_perf: improve default mempool ops selection 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: Sun, 19 Nov 2017 04:55:48 -0000 Use of rte_eal_mbuf_default_mempool_ops() API will allow to override pool handler through "--mbuf-pool-ops-name" eal command line argument. Signed-off-by: Jerin Jacob --- test/test/test_mempool_perf.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/test/test_mempool_perf.c b/test/test/test_mempool_perf.c index 749b364ee..85b9f782d 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; + const char *default_pool_ops; int ret = -1; rte_atomic32_init(&synchro); @@ -336,6 +337,7 @@ test_mempool_perf(void) if (mp_cache == NULL) goto err; + default_pool_ops = rte_eal_mbuf_default_mempool_ops(); /* Create a mempool based on Default handler */ default_pool = rte_mempool_create_empty("default_pool", MEMPOOL_SIZE, @@ -344,21 +346,18 @@ test_mempool_perf(void) SOCKET_ID_ANY, 0); if (default_pool == NULL) { - printf("cannot allocate %s mempool\n", - RTE_MBUF_DEFAULT_MEMPOOL_OPS); + printf("cannot allocate %s mempool\n", default_pool_ops); goto err; } - if (rte_mempool_set_ops_byname(default_pool, - RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) + if (rte_mempool_set_ops_byname(default_pool, default_pool_ops, NULL) < 0) { - printf("cannot set %s handler\n", RTE_MBUF_DEFAULT_MEMPOOL_OPS); + printf("cannot set %s handler\n", default_pool_ops); goto err; } if (rte_mempool_populate_default(default_pool) < 0) { - printf("cannot populate %s mempool\n", - RTE_MBUF_DEFAULT_MEMPOOL_OPS); + printf("cannot populate %s mempool\n", default_pool_ops); goto err; } @@ -378,7 +377,7 @@ test_mempool_perf(void) /* performance test with 1, 2 and max cores */ printf("start performance test for %s (without cache)\n", - RTE_MBUF_DEFAULT_MEMPOOL_OPS); + default_pool_ops); if (do_one_mempool_test(default_pool, 1) < 0) goto err; -- 2.15.0