From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0043.outbound.protection.outlook.com [104.47.40.43]) by dpdk.org (Postfix) with ESMTP id 4B23332A5 for ; Thu, 28 Jul 2016 12:25:27 +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=A+1ntA1KtWxCHVh74oLvklvUaNLaax1hV0WdFJvXfLA=; b=OjVZ+0te/uZC4lNPo5zeG4I3PAgUzZa9s89vWZSAHTr7KokqllOj5NogYh4RHYCg2dUdXDXVZt7HodKax9sxUOZpZTNMep2P71JoVjFyrvogy3pwuj3h/Jwe+OXld9u8m0qPikBu0Vh9f3HHFiWn4reBfkl5Ht0YPRziDuP+QUQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (12.108.191.226) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Thu, 28 Jul 2016 10:25:21 +0000 Date: Thu, 28 Jul 2016 15:55:13 +0530 From: Jerin Jacob To: Olivier MATZ CC: Hemant Agrawal , David Hunt , "dev@dpdk.org" , Thomas Monjalon , "viktorin@rehivetech.com" , Shreyansh Jain Message-ID: <20160728102512.GA13403@localhost.localdomain> References: <20160727095128.GA11679@localhost.localdomain> <5799C32C.3050907@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <5799C32C.3050907@6wind.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [12.108.191.226] X-ClientProxiedBy: BN3PR0301CA0025.namprd03.prod.outlook.com (10.160.180.163) To BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) X-MS-Office365-Filtering-Correlation-Id: 1befeb0c-649b-4bf2-84f8-08d3b6d17ca7 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 2:mHbp3gvU24L80sRyCRdNR1k4WBCGLIJ/NBtXoYh/CiYZwxfK0gllNjjgMZOQtAe/lIpQyBWNugyFl/yemZakK0sZfAPGX0l3PVieGmBZ6v3uDxd5CjaPCveDsLJxdk4VW3PGL6Jek1iO9+LXp0inmMjuAZTSuIeT3XsMwpnRHIt3WRkZZoOWV4zWKQk3kaeG; 3:P4hsSXi5PY10dSgpBuXk11q24zDftOs/qDKnDFPuVBZJbBTMWpTr0Q5pgmKf+bEnPItbm5mRcrUZ17wHIbl0WeNLrojGEN2GZo9wK6hrXAg93dOVWK2GVLbLV9XTn9kI; 25:wypmDxrEySjrF+4XusASS2zTjAzNDzKhAgoCVFOvz+END2yjuTHBfRP4Ayn/5dcOj0t+/l+ZcPtQe7q0qSm4YkZS0De6NV2efFmpQl3LJjfnNvUOGDbGSOL1ABI+jp8cfsDvrAkJVU+MwqibtEZstzXu4iqRrRNeXkqbh7lw6KKSpbQBEb9/TbriWu3ZHnYtcrVcNRoS9JBJRT9Wjl/XPMgAppap5t63dve9cChA5ywEyQMAH5BIQOcM2IBTwipbSSXh5HfxlI/9kUDyVDVYqscVWa03+eRJofiM1Iv4KD1EcRKpB7EQFg6IEuWWqIXFCPzMTAqFt84WnBW5iOqghgw5kaT+2VLSx/ot4vXnEufYFIioC39uuhtz92Pks9uel7v1cZwPEm6IT8GgnDg3ocStxszqNuTcvjev3gJA964= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 31:PoeAudcd4dMZVPNNSTRyzPV+7cerbii1Rye0PfBadNhWkml+pH91RBQ4oEVhb8gd8hnQ1y9LCBNnbYcbA6J8/5oQ/emwZIcqWB+pQwIUafL2wdCaxRKJ7iaDTRA82lwy5fb9zp9RhOlNqFNtDAV5ZLPM0tIccRgoPbLlDQ0zNNqirVU0OGtGdEcpkKbnxROhwlH+qS0GeqiDTWnKYC/VZg==; 20:HWzkc77j7x6sU3gfsp4rsaiW2/slHxtUDh0AO3UcKPpYZQHL/obaFxe1VgM7kQ9K7vJxln/iYyNYX+KJ6wWwHNYlXBoKCCSdBZEofJ181hv59Djw/j7w3UC6DuY6EvtfiOrQAdx3yl5bDLZwGRhz98rWBSDo9vwd405df+XFAmnjDjAjBMEmUplhyjb1PQFHlIgJ0maBYeuf+GSHKsjON+kZb8n5TNf1kIfuS++eAMK/SAUPLH1XIx185wJRZl1Mfoyq3mFnjjo0eWpUrr65ptsCYVBHcnYar8xLhdiXdPSrJgKYxOfl1fdbHO8BiA+z4odPz1NxFnpCjQD6UaJh+hg/8rqkOyWPVigkJwUWNbD1njmsbYEA+VPveVFGDcAhfd3nFmKunPBIuiZKRoymUcmYXbpbYyAYKDw0HB+gd8jAew3QslZRuYei0tRXw9rsXebGSOCpLNrEc2DKQdtpSFR2syTVevo2lXA2enz/fjpreJDZU7+yGeO4DJg8LY2mRWtAEQPKMU498mLhVJF9bAuJegwwQ1uNLytHISXptF7Lf9TI0N16mEHNbEhvmEafY71U3hVDEPEEOv7FC2PSu8XihZdxECjIIKP6QceNUKk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:9+EC0wDn023EKxhltAxlDW7469OOaA6qXtRWasves0ohvlSls9inNGzDRWAQxCoKeDZhmYO2yldjPr17I8WKqaoWtS6ZBDTVLhNYPFaudv/oMwen+++tAN2nWTkptExEXn0UiFW3/9DmCWj1NcCskn8dZ2WCwHTatbEzpUdzX/GloK/w9OTT7Q+HoQKDZ+oxmgQhxXzCRI7V2fBY29MT4NZbBL2yM4KWiyLXljPdTkOwVLzKvzYCMJfcvBsY+zRxXC9UhTo6W1dx6XHqURdF8fbRvYo7EnhOXlcF3jYREfdLurhbdcIEJzgTO2pVsKaKw5RrwNnXshotXoiXKq683I0ekIvYNYHwlrZ2n3JZ6MPogUu8dl8wmurQIkreVg99qlKmvjHqcG06GZrumIKe65TkBwPY9EdweJyg/0WWiMA= X-Forefront-PRVS: 00179089FD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(24454002)(199003)(51444003)(377454003)(189002)(2906002)(50466002)(77096005)(83506001)(19580395003)(101416001)(54356999)(23726003)(76176999)(6116002)(33656002)(2950100001)(1076002)(50986999)(3846002)(305945005)(189998001)(46406003)(4326007)(7736002)(81156014)(9686002)(42186005)(586003)(81166006)(8676002)(8666005)(61506002)(68736007)(110136002)(47776003)(92566002)(97736004)(4001350100001)(97756001)(105586002)(66066001)(106356001)(7846002)(18370500001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.localdomain; 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; BN3PR0701MB1720; 23:56ht3eXxkfx93wIi2uiPt7X5CXofHgy5WDCCql6?= =?us-ascii?Q?y5Yy8LJQDXdstpJHdzMAEcGAzP411K+gCT0Bb98cdi3ZKDxeV0TLwmjixvJg?= =?us-ascii?Q?07A4jh8GIvYhN7UUgd7xV0edf5vaIRFyAIGBehcivAVOdgeeVTcA6nH2Zeik?= =?us-ascii?Q?FIH8Rpykm6Xpml6MeQtQjuGxZQAh4nJtnqt9on4oFs2DSH6rrZhDAVgjw1Gm?= =?us-ascii?Q?KkFnVrYGrxpKQnWf08w+dQzPN3zv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dsJ+coy0PPFDEeicc0peTMvDB0m3XLHW56iEZYD4lo1u+aBID6cYpqh?= =?us-ascii?Q?eenMlvI2bbbCgPSjfe+L5XS4rPrgsJ3sTGIyQdvxpHWdknobP/1DHFYEzRg?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 6:YgzeNMbjYzc45V++EcYDcCNMSzKMm6dNN9mmNuzanZtA4mkfRIgcgqFWPjYKUeoXd2VNvknpD7s5IF59QMfnnUXEYF0ghP5bNFHtune7QMdAWkeGqipf+gvKPIm/NrUoiMDdlKQZOcv3cdwmnL2Z8LG/FeGTk8Rcnuekn4CeJVHg9/TEeFNNfAEuRhCJea6NU7nFlBh0z1QCZ5fJkPQ+72gh4GSmTDvSCNCNZ/5ntSNitZt5aptd4RJ6uuZ+aaDmCY0d3jUKIxYyVNOMwNi2Ljxy/nK2n3ys+87CrE3/yEE=; 5:D6kJrAQxA1g3OMypqbiB7FQU/mURKSbAfCBr9kzeBe8MxklLIjEWBB74xLh6UAwAf6BjgXooFWRnDkcuTXEHmeiGaMjRsqMJ+H5lsN8evk57pdqx7rtcE10raD35DxHjxmttTLcwI1zX+SHV2MJWQg==; 24:GQGRI/9ohC49vPGeNfApvm02guQ1tL0q9QyZuOYYm370ZciyLXM4UaRfBtMZuA5+d+cEiA0peenQuDu/5y+60JKG+QAYOospyAMnBVhTW8s=; 7:BTYUKW6+lLicERBfpSfcfgc6n4CjSXcE6HXz76SOyR6HFGVaxiBDUYDhq+lEVQOws4nER/+X8pCFtD6Qsaie6yCk4zqvndIdczdsLVeQbA9e4i+OMSENSYHxmjTmjZJyJT1mskOS63RaF4ATQOD7kECQdW++dwAO80zexE39+Rol86aSmF1RODDJ9mIVIPGlyTshSjoMK5UmQrZ3ecgRyUQb//RuzS2eCDP6JrolDJI8qbbPwhYWDqG+XH/CUQ/0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2016 10:25:21.2228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: Re: [dpdk-dev] usages issue with external mempool X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 10:25:28 -0000 On Thu, Jul 28, 2016 at 10:32:44AM +0200, Olivier MATZ wrote: Hi Olivier, > Hi Hemant, Jerin, > > On 07/27/2016 11:51 AM, Jerin Jacob wrote: > > On Tue, Jul 26, 2016 at 10:11:13AM +0000, Hemant Agrawal wrote: > > > > > I agree, To me, this is very bad. I have raised this concern earlier > > also > > > > Since applications like OVS goes through "rte_mempool_create" for > > even packet buffer pool creation. IMO it make senses to extend > > "rte_mempool_create" to take one more argument to provide external pool > > handler name(NULL for default). I don't see any valid technical reason > > to treat external pool handler based mempool creation API different > > from default handler. > > I disagree that changing from one function do_many_stuff(11 args) to several > do_one_stuff(few args) functions is a regression. > > I don't feel that having a new function with 12 args solves anything. > What is the problem of having 20 lines of code for initializing a mbuf pool? > The new API gives more flexibility, and it allow an application to define > its own function if the default one cannot be used. > The problem I have in this scheme is that there is no visibility on converging part of external vs default based pool manager Creation/usage. Can we deprecate the original (11 args) API have ONLY ONE WAY to create/use the mempool irrespective of external or internal ?.So in application perspective it is converged and its matter selecting the handler name. I believe deprecation of (11 args) API is the only that can happen ? Any other thoughts on converging it? for an example, look at cryptodev, selection of SW based virtual or HW based physical device section and usage are identical in APPLICATION perspective. > I think that the name of the functions pretty well defines what they do: > > rte_mempool_create_empty(): create an empty mempool > rte_mempool_set_ops_byname(): set the mempool handler from its name > rte_pktmbuf_pool_init(): initialize the mempool as a packet pool > rte_mempool_populate_default(): populate the pool with objects > rte_mempool_obj_iter(): call a function for each object > I agree.New APIs are great. See above Jerin