From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0078.outbound.protection.outlook.com [104.47.34.78]) by dpdk.org (Postfix) with ESMTP id 74BD62A6C for ; Wed, 5 Apr 2017 09:02:23 +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=E323QuqDaUSbI6oIWJ+NrB/+jaDrdoy4iqF3FQJirqg=; b=BvqP9oPfnJqWxjT2FLS3WhuTMc8Zt9mJLyQRF49k2fhGL6svc9Qb057jmcTi+8UMMQJMv5kSVhjFuksP9er2K6xBzZVbKyntbIxITl2Bs2OzS2KgFgHVfowZ176TPnDwb7p2YiJ7IiFMsoSxGToEj6CLTEubI95HC4XvdNIa/mk= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from [10.160.0.44] (111.93.218.67) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Wed, 5 Apr 2017 07:02:18 +0000 To: Hemant Agrawal , olivier.matz@6wind.com References: <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> <1491285429-1114-1-git-send-email-hemant.agrawal@nxp.com> <1491285429-1114-2-git-send-email-hemant.agrawal@nxp.com> Cc: dev@dpdk.org, shreyansh.jain@nxp.com From: santosh Message-ID: Date: Wed, 5 Apr 2017 12:32:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1491285429-1114-2-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0006.INDPRD01.PROD.OUTLOOK.COM (10.164.117.13) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: 041a4246-5c61-4001-5cf4-08d47bf1b446 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:cM3SWFRPMtWt6YzfKxJ1qbqfuq4efPtW2pY0jaHq55lqeBpR1s1X4NPJlbXI5tWt1yZxbnmqPtZEtoJeKRp9tO/AyykBsWjjC++ujPtilBX+aj5WBjaFCF2wZQFESZmpfQTzZ47RV+rxWioFpfRRxiQXg/B8ILD7/ghrg44mNbmydf1LGZHUGHY/X8tnjhQo/qj66S5mugJ9s1tg146lIhuyIpViNGqlM/LvkOBYcCXas3yovtJL7TYnYxR1aYP93Ac77fDSFuo4HDKngMYLPiqqcltq3aja66HSfs5vCY38k7jV+UlvtPOzJ0CAmu41Z1j+nE+k6A0vvKt3B2ENWg==; 25:YdNx8Ffd+J9Bfvc9eMf1ssMI2WWWpbJd72TcAHwwuwNeENKmh8atlHzXybGguNy9tgzy8mKSQmpCiEV12kx392AHcEODgS07KCb643WsLE5LKaKuqvao5bUiH42r1K1GilWDEjusn/Tmcooz6MMpumZpLC49LDie+pG2rBUxB5MhftYdE/MfRlTbN+wQwJk8m/h/oEih3Spk9tpz6pD9/Wf7+t4Lnw75zqYLpYAjc0Ysh0VA1+frbOn2uypc3ynGXoUt/OFC8Q4cpayiK/UBmwsFDDlPY62u9vVYl56ajdlQVoMRqyO5u/+SJh6ht/iQ/13kmBpdHHXmpt73nG0qZ9IRc1fUr9+Z7V1+mVu25My+u5tWl+x70OghgbGmKyjrDHV1woAlsjjfEGGEdpJP/5j8ql+ejW6q0fMgkWUmQaMGiXgpYKReHwuGw03qPJOrZ6fQA1TRXwlsXYTjf6+bHA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:Lay5qwF2OGDiy0Zvh6aFGvXafLuFFt4D1lPd5m5MSjX68iqagYpbYTac9jMY61eb6JEiULFwGoZi2XXJdQCMnrFTBwV6Sd5jUuI709LOcMJfSLFwEHA2re5xxjBLiw5vazLrhV6w8B5DTVLTNfcrU1leK3hCYaKaeiDhEBMdYrm06+2kWM4GFaA3qMj6rAGqorOYTBzapY4l5Rf41sK/QsJR3eqYuDZ9lrMA6MhNPsFdHwHGe2j2JYn2HSz7vHy+wDWZZrRhwrZiuEbaSEfZHaqSOTdCbRniWdOVFIgSPSc=; 20:j/2vsLaDtuP54oYhuOE69wy5HpFzzUM8A2qcRg4ZJ2GbAJi3pWkHZvxu4WezXecwXhT+9X7l+V6iq8+yQNiP3yOn2OT1qInQRNWjH6e/livBiMBou+izSDJz8lrJXLtBdimtLQZ7YgZtmNtlwgEdI1BVuimm0YuOXXim12BvmYbDQg8fd6O9exz/PTmXSIZjcR31eakSmhp8eqn2fCJZG67DY5iUlQqywh6Y+4SaPidUuXIBj5azABAPDakyExyuIzV6tDv7subxgM9TNV7lBCf2XRicQpKomzQ6LfLg/nAaUCFVmXeWBPa8hpRYYSy2A4Fu/byZpJXQjF5QRAw9ayTitEUgYPtargyMsO/16cGrUQ+Y2pKXm4YIQRSR8uREewwM8khhgad+DRpDKPUKKWOMJ9dR2dR9ycD/4AlHV5/xpAh6TfHW93/xfLHjzeeR4ATk61CeTvlt6ej87tUamJPX/jkfgJ1Rtca7fEvh+QJkfgefhkfeBF/o4rsUyBLBlQfocWr+noRFjMQTntsR4MPhGCsUrQaZZg37TgleOC0X35Dihx+Y+hJIpCiogSkEe3IjQJl+rXKwzG2x+3iKpFqiLY92+FD0s7zqh3Joyl0= 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)(93006095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:CUFm3mtOXnrC/9EoscA5o0nksC24rfCFMh4BJ/5lfI129w4OPFi5PH7EhnHf/Id2kZ2+4BOmvDmw2V8g4C/XDoI/y2H58nafSX/2qZBnhUa3Wfos29TeTEZ1BDL+yQtJYkDwDXwLs8YIgT6DJlsYP8w7F5T0tS/+tS9z4ZVnuuLzEplPVpCBiMqnsZGPZbPYrY29YMrCWOAuua+zYxZ1juVaD+3HfbQVsLN4y9o1KuZk6TIpeubKiRgiSXE10KMYFtkMyUtCk6l84AS/aswgIPc6KZv3f+JMi2FQmHI1KF0C+SH3OT+eS7U5+VO0VcAUb7CKCbdHW4Q74vINjr3DTCub2vuCudHiGT5AVZUrcDJquOfqt/3YbvbGScNcttuG0R8qU3MpD4+DzzLL74Fvq9YYN9UPOPwrkAnC4sfRy588LrB4pKFJIuDnv/kAESRqPopsx1SAMrbBKBn2VhSW3i37T/MgbCkwAovYR39NKndqisglbw+ULtOvLHVZCf8mDspzvsMfs49bxGWRuV3GSYyPGARVD/8WTlR1qByY438pmVQKGqxtuHQ3Oe41DT+vS0tbk68WfDBAl3MB1DAidy8AtDOEPWqG0+XNFj9nymhbU00N9BPybfuETovd4JIFLTj/HVsAKzj5RAzQJOjQ3gabUKPk51ET9EVO31Yxkej6iyczMcBXu/UcZhAZw+dQmqGbAK+LVmlZb4qKkRfGJvbzNfm4yxnPJREsG34wCfWhG8tG844kaBu8yZaAmOk5 X-Forefront-PRVS: 0268246AE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6049001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(24454002)(377454003)(42186005)(2906002)(31686004)(305945005)(110136004)(38730400002)(54356999)(50986999)(5660300001)(6666003)(64126003)(42882006)(2950100002)(229853002)(4001350100001)(23746002)(189998001)(50466002)(65826007)(33646002)(8656002)(86152003)(76176999)(6246003)(53936002)(77096006)(6486002)(90366009)(36756003)(5009440100003)(81166006)(25786009)(31696002)(575784001)(65806001)(66066001)(65956001)(230700001)(8676002)(47776003)(3846002)(83506001)(6116002)(7736002)(4326008)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:[10.160.0.44]; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY1PR0701MB1723; 23:ACTYUfO5E0kZpLX5Jh4bmgostidGhnClUNR?= =?Windows-1252?Q?5QNmjuzrUFdD1ynfhBFX1b7P56O67zIWEYvRPyqhsWae3mtKpwJlrQ5t?= =?Windows-1252?Q?0ApFlXYGVIAIXV4UBuT6bR+4vJYXHYgL5lelDPNx8X3Qjt3E/mHw6/Rs?= =?Windows-1252?Q?NNPT0YpXM2hlzW7Og7usCgVOcz4J84ZI/g5cVgTveyOucKngBk3FMaNm?= =?Windows-1252?Q?zWCEV2XO4uWX+JKjwBHUslUqkfB9T9r/E01O6dQFADeo9dbRNkodfY5Q?= =?Windows-1252?Q?u/Cbh95xW9AkbfRcjyf0X3d3Fl1VUrSVI65ZTi5WpX9e95f8i243bzAH?= =?Windows-1252?Q?bz145KEKkA+lTaZj3tZlRsC/IysJYAq/fQzk46hK9dCXXc76UsYgfxQY?= =?Windows-1252?Q?o2kOF7IxcqwAb8YajkLMIMD2FzQ1JgfhnXFfIiPyUIwPbnhNIsYPlJRo?= =?Windows-1252?Q?2KV2b6yyxiduzvBjq2VuMLG89Z5A8YJrBseEnmBeQqobmEsNrtdGIzYb?= =?Windows-1252?Q?FLS/cc67100EXqXsB33yxV/F8p0/lDGYN2XgrcYaaBHUDf4WZkfKTpKd?= =?Windows-1252?Q?yJa/q3qPfRCs9LeXdMF3MToxeqFJHZ90Xymd5n0MDA5ZqcQY2XqARCng?= =?Windows-1252?Q?tTTVBzWvu+RGPFVos6cKlTGLRdkqwwpAooEfx8NoQ9QohOawsSwLk8/V?= =?Windows-1252?Q?DKoWlFS/r9WG/nTwp7/ID2r75672YbdrXqzSKb67QzyDFZ1gcrvPBPlJ?= =?Windows-1252?Q?q7tfDuHcxTiDs0vf13ztC1gfvN4yaNg2u06VIZCSDv/c3uE8hNKHuzos?= =?Windows-1252?Q?8gzL1l5b+PfRSRSHT2DZJw8bFyy5a5gVNyXSyhK34kcAYPQjNZHFwcLc?= =?Windows-1252?Q?GBi6iFYXFT7mD4zxwKVFNCPRort17jveagh3nkHvzCjs1PnFxggByu3b?= =?Windows-1252?Q?9GkAG0pVuFXJ/jPZnP4f2bQjPQhMU/NeBc2mANVq6bawvf3Qq0/Ho5tY?= =?Windows-1252?Q?txWCv0Wr0lGRvojeRGw45K4zZAURnzfzIFYpdemyntGHdfSMiyF0npOa?= =?Windows-1252?Q?FjraWgxOlQaC5gDLUQOEn+tGp1Ly2iI2q4v3fnoEiyfCx/c5tcnKmoq1?= =?Windows-1252?Q?GlSOiNBPe2VgsezmgKDQlOWEi/vhZie92sSqz8YQ23G10Ll9IJ4OrSys?= =?Windows-1252?Q?0hW6i5AekxxT92nn+QshE+H+VHhtEvmYRM9mE1NEL4rRpMyVU23wPTSH?= =?Windows-1252?Q?XHYL3egJWG1f1FWuM+OAkMXBc3mok1H8cglpZb3Vj0v9SwzKjziER2iv?= =?Windows-1252?Q?HgD6a7n1XDGEGzQu6vd788pvV3Ue527C7FGPYeMGePMBEsQjS1HiK5wF?= =?Windows-1252?Q?Cs+NNy1RCcGT/tAyP9T6PakIDbXSPuZ/ZwY//D98WRGO2ggobM8JdkJc?= =?Windows-1252?Q?vgkI5gyGMUQZcjfInVHeorAqZCFe52eNGBfz9AxrDt3XGstPM4+CIuVi?= =?Windows-1252?Q?iCBzAk5cLp69KNNOzmA1Q71Lloy+g2dT8+GWXE751Rt5+VkBOlWkA/af?= =?Windows-1252?Q?bqenx9hQMzYRIpZhVeEOwF8P8UyMbiBE8pOoV?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 6:YLEfOcNaafAAqgHDsEfJgoWY5B4E5FXHQTeQuHUSaQ2xc3EroGH0uFXiqcmgr1kW9BMrK0z8+ywnvUEycVO9CRMsJM4S8S7dawt7NzuL9Qq1HDgR/0sA1r0+YiJybE4ayHZN/0VAG5RDQeqRBu+PKj40RvSmrFuw+5DDKW6YZTEv8vrgHwnGjD5uKvBQX1FwAXgqkVBwQxwGObMsCdNI+H5JWJMM/4y08JTedlOjK9udbIGg7gnXdCOcubJFXMHULYOEB5v4am6GE+DgszHfjSeZUKM4jHvhMCQ7dAXq52yqcJHrpYMq9Slht3qFcdx7qKg4el40mLlZvYRNcGsshH2JzZcoxg5KaEn6YG0ZJrfs9ecTsWI3ZWFJlBZ9wR15d4PnB1s3VLOOT/MS1CYpkg==; 5:Efdk5JJGeI/swTrq8BOeBhXdDO4P6alTucsZC7CLWuScLtaTUC0kf69HhZoByJGi+XHvSWEuUZOBzOpqti5HFynDF3ij2aSq5X2nJl6ljCMiN2AZxGPluctVRxU+lsb0VIIZmz54/CcXi6e5K3Txxw==; 24:u0/06S0kgZVsU+kx4Mkvo3wepg5ydGl/swYaCnSCBBYzrTYADCGuAjID/NLjA5GDlHykGABX0WXwvRx3NHsRCZd0wXI6lIa3jdXUNAQpHqs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:y0zOrCw/cFbFjwvg774A4D0GzXnaZOB7Fdm0shgdqyuYYehdZ5ZmwZA3uFrBeAb0maFuTKkumU7G8y3a4tk3zf53Fq2Jn5sBjbPY2OwD8pZbbesMKlANctEdHsxzCFWHA2L6J32OXz5SA+HbMaf25VVq2TW1QV81lhcvtUsfZdVkvA6ySGiyoP6RyubmnDIHctOCkMXUj+PWtjQgWYD9gpC/nDEVIHs8q2Abdb9aVs+SYn0EKreAvzUztyDi7uVUIjmLlMAA3ZesexRWRJdmvxSHQ1guvRm7amkvymM+izM2008fQvCqaDGWyWN6uF0uMFdvkmdsoxY/jeHxMHJr+A== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 07:02:18.9160 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: Re: [dpdk-dev] [PATCH v3 2/2] 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: Wed, 05 Apr 2017 07:02:24 -0000 On Tuesday 04 April 2017 11:27 AM, Hemant Agrawal wrote: > From: Shreyansh Jain > > Mempool test currently supports: > * ring_mp_mc > * stack > > 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) > > Signed-off-by: Shreyansh Jain > --- > v3: fix the incorrect split > v2: split the fix from change > > test/test/test_mempool.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c > index 715b250..6f0ca84 100644 > --- a/test/test/test_mempool.c > +++ b/test/test/test_mempool.c > @@ -513,6 +513,7 @@ static int test_mempool_single_consumer(void) > 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); > > @@ -562,6 +563,30 @@ static int test_mempool_single_consumer(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"); Few nits: printf("cannot allocate %s mempool\n", RTE_MBUF_DEFAULT_MEMPOOL_OPS) > + goto err; > + } > + if (rte_mempool_populate_default(default_pool) < 0) { > + printf("cannot populate default mempool\n"); ditto.. > + 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"); > @@ -606,6 +631,9 @@ static int test_mempool_single_consumer(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); > > ret = 0; > @@ -614,6 +642,8 @@ static int test_mempool_single_consumer(void) > rte_mempool_free(mp_nocache); > rte_mempool_free(mp_cache); > rte_mempool_free(mp_stack); > + rte_mempool_free(default_pool); > + Rest looks okay to me: Reviewed-by: Santosh Shukla > return ret; > } >