From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0067.outbound.protection.outlook.com [104.47.37.67]) by dpdk.org (Postfix) with ESMTP id 2775B374C for ; Fri, 31 Mar 2017 17:11:52 +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=Lbqg8XVlYpPqZk/OOJlmiLYyehAChz2PLBxwKvFS3jQ=; b=cr4OkNBiB28tDjEfTuf1ZsPIT3lokW3lT+GmZNN9QbZndbWMdijyfGL2ejUeB/pVBnagXry/vZ8uFG3gzcWxcXGG0za24Ert3Ws6EKfzX0wBHnEqQVTsYl6N7zvMh3QcAZcLj7N1qzHkLJPe1GDhaGQR8YemiwsOe9YnfjwZpX0= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from santosh-Latitude-E5530-non-vPro (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Fri, 31 Mar 2017 15:11:47 +0000 Date: Fri, 31 Mar 2017 20:41:16 +0530 From: Santosh Shukla To: Shreyansh Jain Cc: olivier.matz@6wind.com, dev@dpdk.org, hemant.agrawal@nxp.com Message-ID: <20170331151100.GA11069@santosh-Latitude-E5530-non-vPro> References: <1490955469-16216-1-git-send-email-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490955469-16216-1-git-send-email-shreyansh.jain@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0028.INDPRD01.PROD.OUTLOOK.COM (10.164.117.35) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-Office365-Filtering-Correlation-Id: ea9f6e25-3b79-43a1-81f7-08d478484157 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:ojRp/JSL/MTKfY/gQLMExWLVJ8aqlZaSVOoTZuq4rGBBUzzG8UJDaxF+1TU54N9wNJ1VUwfs5js0AVyvRRQYE40B+aLdGd1FGIb/1NTX5d3AYZy4e/v5++B+mTVBORu7I+M3Jp433754hn29pyS4qnaObWXWmthzpfXMwB22UUuc7u+Ucsf8WIXbD/OYDzuDhEsCQhvK4WotgJfmmhJJLXubz/y5xzmlxlVPW1s9Z7fpxgl3tJhPkt5S2Z/QKybeHLoqaU58We/0C/iaK+fPSb5Mt6NCqssixGYy5WRr2c7eRgVQbn/aX/7r+J9ttyi7heTrTnZty4RmoylHqjVNPQ==; 25:GgX1/2Rs7+mkE5I8vEC1IU2hJfYXOQuIl47pUTBqta9fLyno3S2tSQj67tFpxIlAbXQhMsWXfeVpxVuymJ/j9wZgSFMP8KIvl4McerAmACGWvfh6iIMQuYfmY4eIRVOFTQZXYoSInQ39q5JNDoKom4mTe33P9zEoMEGOYy0qjgU/MYotFW86gHSlfC0dYDUETjcVL5P3i3U9GctHW0AdFtEf5g/+bdbkiLPR/4hE1D4Wwp2EmQ1oJU4SPf0R/GtQJ6os2LTkHIzeRz4tfiN9N2Le+WEIM5io9hnhZ4qqa7B7VtJnhk8P+06y0vxauucW1HuPaE8KTqD23hDLILHL3ox3oP+JaCx9dvH2sHP42CexzIqJdXLBepGC2m4nDAFcFtrQ4aXVTrwhmUIZDmIwKDDY6UpvWdYV+9MjlXi/K5/9pp5b+VFaSqeIautmzU/S5cHVZtQbKLaKOkeBZNm8og== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:ulkn1C61skJCUpT+/fj1rAZ+6tt3bHiA72qoEW7kO4T/A62aKK4FjfZOMBPRHPgjWLggbNMo0vSZhGNKqIwcTMwMJRlnC3f/r3dnYtI3e2+DHsL9785IrMnOZpt2v1VaP+EnnTi6QVOpUb+n2vd2gr6y9A44f+GxkFem1mRyN8yKYVxLxsvhpTkbKw+WoaaCdTmnFhyRCe4X1PDRBtSlEgLvKRmRJlu6NkiUMQ94ZkmO7pCtz0Hh6egJGTuWrazJ9bt0YN2+GyTyQYTw3cmUFw==; 20:p1/DartQnO/kFDr4gHr9k/njDNzj3hhKxTze9745eRjde0WA5dYaaXmut2CoOXLeKIAe5tTwVaKZltOkQAhkgJyDSF3gWmljQrvUnAW0chYlPtkSo7BwbqXwYLeEpH3WxZKYyJynGA/Nfi5Ax67DqPcTMyGjEHkCfaMhmIk3tdMdNOkwx1v/EiWmSybaF4N818ps82p34MCoAkRUW1oIs5v2beV1sggGhRkIjwxw2K01uFKBhRNtYcepTk3YekmygkTaKT25VffqlkfRK02qK9aN2MyGXagxGsk/V28/Rh6ZgNsYW2N90WMp5IliQGxrXBpZMoIEb6onsoCHzvVNuW3HBT6oxYamHbsYg82j6wd8/TC4g9kYeWUe4weWI83W4rqpFHp1/XMUITi5ZHV8Gan/uKuj8Hc70WexpcyBvpolRIudtL8tLxmp9UGG7l7y0JOfXz6UN4ioprwq2Pmo3uqsnDuIYFOVKhzzAlzNnK1LIF4tEj8QM9a8wUJ9FhuMzsm8H4ojzm9rLRoiHfxnxMhb5MwVslH3Q8C+2RT8il31OVlw02UiVNuA6CbqNdQtpyBItefDEOgDvqZPRKlRsrE4pqDevmMAnaeMLxrICg4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:W7V8F3P+fXEhb8CpOPaD0SDKKO4aPdmrGU7ydeXDdw17/JjIXStdTppb3PrvxKbFNcTXpu6lKzSb9lA9k7dW76MDGZlKtlwUHQfZP5OvE6Gi0QaDimZpqira7BKpXgyF257nbN3mRnedl8tRHWo/QEh5zKJ53WQYkQMoRmoDs0wyr3ZQESuya5/TfisBLikH+IAIaUaVs/bbLWSWAxQ31aPGwc8ipYdw1t4S5BOY8YO2slGsXjACo9EvJb5S/6UVNmGlF210MS6avQRJXxfyaFmJ5k9/DE0VmoEqpAneEhcukdsC3YSCjARG8Twi6LUXg7OBSxO34n8AalLNijgxkNNdGPTydlOjkBOjzK2rK2qqC2fn7gTwPKBZEKBGHI6936Yk6wX0AVOxMqCfgUA4XrsfDTwtPrLZtXKk7/xrg9OXXBDVqvN8bOmcPAMCHQBj4OZB4ebntflGo/PtBJOixT7dbcmFM3HMjdDuThsnLYw6FGHTSY237T+njrT+TLkjQ1tUmtOZieaocmWuBX7HP+8wbQpkgAjFRK1a8dIw5P26qW9sSReMS4KaBKwAi5KppWUqSw7N145jCA8fR2prR0rvH4zXFQ0bb3/U16eMYZ5HyS942p5zIbN/CUER6OOzEhx4I2KxTNEYMiVgMbaFmVlj195Tomf/i0mxzyt711koDw8oPa0gn7jzALalWE3WFtMYr0tBBiglVn1S31PL3FsI+R7s3oCwlKFZsUbOaMNFOiPS7f5oCN53WdDF3IbEanw0tIAPa3msMSpnPsIB1w== X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39410400002)(39850400002)(24454002)(55016002)(8656002)(47776003)(66066001)(50466002)(9686003)(33716001)(2906002)(33656002)(83506001)(53936002)(1076002)(23726003)(6496005)(3846002)(6116002)(229853002)(305945005)(38730400002)(42186005)(110136004)(5660300001)(5009440100003)(4001350100001)(42882006)(76176999)(54356999)(4326008)(2950100002)(6666003)(6916009)(189998001)(6246003)(81166006)(8676002)(50986999)(25786009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:santosh-Latitude-E5530-non-vPro; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:NwXvx3hMKjzAsPsUNVx+S090+BR75aT3ZjDDkUo?= =?us-ascii?Q?zVn7ukOE1cUCUjJhwhv2d5Mu4v9r9yU16q6fvL5t9I0QAhjbFZHBDuO+SI7M?= =?us-ascii?Q?Ujw1kQP0mVgcXP4vTuqaT/Ex63m9dxdfvE8KVkHOMFWE1t/SnOE/dCrb3VLA?= =?us-ascii?Q?VHqwvTfbP5sNiqulE7F5asVmKSJ3Mo03zbxMxul3LgaOdEW29o06HAGT1E3F?= =?us-ascii?Q?nzr41PjQTvxjQFtM9vd+7Ol/d7+3H7tWy9pTA9XvKekNnxZjg/c2KoRGSx1h?= =?us-ascii?Q?ttwwHDo3ank0BFzNHueDUQwq6nTVL6WywK3IG9pRJN7hXaTb4iIqTAJJzSRc?= =?us-ascii?Q?nov6AiWupsZ4Hf3j/Y2v15Xj/5yR55/4SKVCZlkI3tTo5l2SAeCJUYbxS+Ll?= =?us-ascii?Q?Ccj4QVfx4HknM0y669gA9U4g8Ye5El4RsSzl/hxsMiYa7JGSdEAhywBO2daf?= =?us-ascii?Q?aCwsm5pRfZHRtCW1dDFzVOHsFMXo3GOlOCmFdj5h5bmY65IIWQbneW93Tvmd?= =?us-ascii?Q?YYUhHTOP+ZdcLv5bdSSQa5w8jNU/t0sfcHz8+VRpRSKD5ENpr6DLluCJuI6Q?= =?us-ascii?Q?mY3usUf1ByDWnK/MAu/pRoKRXivdS2OLPa9EqNnshJdORKg/3Okz0XUtte72?= =?us-ascii?Q?C2d7Ea6Bzt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Si8v8RmHSQ3L5ytNQ1PiIU/msDZP58S1/cC5g==; 5:NvTDXcEb81bytcNg9oX2V0kin2MMhCkqORqAlSUiKE3TXOegjhzlJmvAPNkU5GWdXZvyZoIf4LcoTuDv7S98LdkLA6WhF9xHkeYcpA/3meJkWWGDiX6jRUnhkdIKCzLoHV1KalUz/5SV/ohkmN/EFw==; 24:x5mSEiQtNh1nWk40AUeSA4o1ph6lyzGGIfn0VuQsV8flbcNouszEKK3LZs04g4bN8xTLEXoL5eb8O9Npp40a0bmH6rq+lzYfGEoK1GI4wz0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:26IgPaQY1fTc/g0hnMxMUkxwaWDOAx2OD6tITHeYE6JqYhQnEpQS8/4L/a0r6qwzNGFreNWUDcj7E4MEDOncIUQZdcOjas48XsZl3RSsClMHHq4ScXsIs4sZ3Gxt61wQ46s3b0PO5UYg28P+h3Jsh3H+HxBmu4Dg8XjiWU5R5KG34JyiIoeefSTaS22tGtMkPtrMr2L09XfqFRpN4KsOIO0NLT2Byk8d4XdZs6r9PX9vUgz6EJJiRa5hncX3XixkDPx/rm75Gmi7joZ+6c3nZH6gtr6ltqlh+fL+Dg8EGDhiEICXB6P+Fvvg5wyku+9tuTKQxZYiBSc5Nm4ZT7YILg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 15:11:47.5782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: Re: [dpdk-dev] [RFC PATCH] test/test: 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: Fri, 31 Mar 2017 15:11:53 -0000 On Fri, Mar 31, 2017 at 03:47:49PM +0530, Shreyansh Jain wrote: > Mempool test currently supports: > * ring_mp_mc > * stack > > In case a new mempool handler is added, there are multiple options > for supporting that in the mempool autotest: > 1. Like the patch below, adding a new default pool options > So, ring* + stack + default (which can be 'stack' or 'ring') > * This way, whatever the value of RTE_MBUF_DEFAULT_MEMPOOL_OPS is set, > it would be verified. > * even if that means duplicating some test (for example when "stack" is > set as default and it already part of standard test) > > 2. Removing stack handler as standard, and moving only to one specified > by RTE_MBUF_DEFAULT_MEMPOOL_OPS (+ existing ring*) > * It still leaves space for duplication of ring_mp_mc in case that is > set to default (as in case of master tree) > > 3. Iterating over the list of mempool handlers and performing a set > or predefined tests > * reqiures quite a lot of rewrite of mempool autotest > * specially, allowing some special tests (cache/no-cache) cases when > a set of variables in loop are being used, would be tricky > > 4. only checking the default pool set by RTE_* macro > * In case a user has build DPDK using a configured value, probably it > expected that application (or custom applications) would use that > default handler. > * would also mean that non-default (non RTE_* value) would not be tested > even though they are being used. > > The decision above would impact how new mempool handlers are added and > how their testing (API verification) can be done without impacting the > mempool_autotest file everytime. > > Signed-off-by: Shreyansh Jain > > --- > test/test/test_mempool.c | 35 +++++++++++++++++++++++++++++++++-- > 1 file changed, 33 insertions(+), 2 deletions(-) > I am too using option-2) for my ext-mempool driver and Yes, there is a chance of 'ring_mp_mc' duplication if left as default. BTW: we need similar changes at mempool_perf test too, right? Are you planning to send, if not then I will propose one. Let me know. Thanks. > diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c > index b9880b3..aefbf80 100644 > --- a/test/test/test_mempool.c > +++ b/test/test/test_mempool.c > @@ -509,9 +509,11 @@ walk_cb(struct rte_mempool *mp, void *userdata __rte_unused) > static int > test_mempool(void) > { > + int ret = -1; > struct rte_mempool *mp_cache = NULL; > struct rte_mempool *mp_nocache = NULL; > struct rte_mempool *mp_stack = NULL; > + struct rte_mempool *default_pool = NULL; > > rte_atomic32_init(&synchro); > > @@ -561,6 +563,30 @@ test_mempool(void) > } > rte_mempool_obj_iter(mp_stack, my_obj_init, NULL); > > + /* Create a mempool based on Default handler, if not "stack" */ > + printf("Testing %s mempool handler\n", > + RTE_MBUF_DEFAULT_MEMPOOL_OPS); > + default_pool = rte_mempool_create_empty("default_pool", > + MEMPOOL_SIZE, > + MEMPOOL_ELT_SIZE, > + RTE_MEMPOOL_CACHE_MAX_SIZE, 0, > + SOCKET_ID_ANY, 0); > + > + if (default_pool == NULL) { > + printf("cannot allocate default mempool\n"); > + goto err; > + } > + if (rte_mempool_set_ops_byname(default_pool, > + RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) { > + printf("cannot set default handler\n"); > + goto err; > + } > + if (rte_mempool_populate_default(default_pool) < 0) { > + printf("cannot populate default mempool\n"); > + goto err; > + } > + rte_mempool_obj_iter(default_pool, my_obj_init, NULL); > + > /* retrieve the mempool from its name */ > if (rte_mempool_lookup("test_nocache") != mp_nocache) { > printf("Cannot lookup mempool from its name\n"); > @@ -605,15 +631,20 @@ test_mempool(void) > if (test_mempool_basic(mp_stack, 1) < 0) > goto err; > > + if (test_mempool_basic(default_pool, 1) < 0) > + goto err; > + > rte_mempool_list_dump(stdout); > > - return 0; > + ret = 0; > > err: > rte_mempool_free(mp_nocache); > rte_mempool_free(mp_cache); > rte_mempool_free(mp_stack); > - return -1; > + rte_mempool_free(default_pool); > + > + return ret; > } > > REGISTER_TEST_COMMAND(mempool_autotest, test_mempool); > -- > 2.7.4 >