From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0061.outbound.protection.outlook.com [157.56.110.61]) by dpdk.org (Postfix) with ESMTP id 224115683 for ; Mon, 30 May 2016 11:42:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rk/5OBRhD2zRs4Ht/ByTjf4ynmu7/AXKFJ7cyj8JMMs=; b=UK/vwbOkeQEvv2kx1NWEyO9DnLXDvZ1dP/GrvmJHRpAYPa/EmMMKyjfNVbV8uIM50kXL9BdXDZ74GJb/cS7gaLfqmmlrgLr+u5nQ77kYckoi6AtRqBjJ5hnT8SvKP0G1FJrBHQDEC17Kaoii0FNoLpLudBmwEetmWmQ8MhFpofQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (122.167.216.55) by BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) with Microsoft SMTP Server (TLS) id 15.1.501.7; Mon, 30 May 2016 09:41:56 +0000 Date: Mon, 30 May 2016 15:11:35 +0530 From: Jerin Jacob To: "Hunt, David" CC: , , , Message-ID: <20160530094129.GA7963@localhost.localdomain> References: <1460642270-8803-1-git-send-email-olivier.matz@6wind.com> <1463665501-18325-1-git-send-email-david.hunt@intel.com> <1463665501-18325-2-git-send-email-david.hunt@intel.com> <20160524153509.GA11249@localhost.localdomain> <574818EA.7010806@intel.com> <20160527103311.GA13577@localhost.localdomain> <57485D4F.9020302@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <57485D4F.9020302@intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.167.216.55] X-ClientProxiedBy: BM1PR01CA0015.INDPRD01.PROD.OUTLOOK.COM (10.163.198.150) To BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) X-MS-Office365-Filtering-Correlation-Id: cf593ca8-5989-4317-a5a6-08d3886ea4f4 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 2:h0OCshrTy4ApiZ3R/FTbgfPi9jmtU+lvSDnx33AaLbqPqKOmCzJI7FJPVAxo3ZdaNejeLiHt7u/GbsYdX/4d8xV9Kn64PErBQ8NzETbAUZwqS53nN5sGSYF6w2HLgYXg9csdDCwdzvDPPIuInf9OsTl2UBdGPSVbN5q9f17upZHLmVNUxeFUi+ZvIeMciz7Y; 3:VEbCVS69kME7C4sJ4ILKaUPtcPP8vBja6UAlhj/OtFZ0IenXdy5WqUJYo1eWnNL2UIBad/qjatL8gd4Tsw4afRwZlrsRaQTvj2M8ykU9SIU9iNGaqJMJoGjJReRXwmjI; 25:ntp1WklVgOA0JuTbzusYg2XNQARzByEhjM9zCB28Y2TJOiHBw896zvRi6TG1vC9ruIaEyjO6/nxqdHc9eFVNgCMhQc2RVyTwJ7wxItA74mxSTD19Qxe2yG6owccxpPTahUqcNoXrx7zRP40SJzY5emidTeIYtCSyUe1fLJx8qOHsDy2rZBB3rvwKFRJxBlOylLOnRloGLhwGiH9oMyG9viTbSRl/KYXSX2AHolabZ5Lri5DuqY75qWQPrADNxWF+Zebw2V+mdn7yEp4FlR5GK4gfEqT9zhopWeogK0weRkAVx0StUxZ1f1cA32YUwvcn2ZgCGUn5urDP8BKdyKWXFCAOWcPE0U+IkLxfdKxvH9IEJ9B9LmxiICgf8en9cvflUwNFkaPV5wIv/vRF9z03uUgDSRsxjQMfT/BHv99UuOE= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 20:QYll5LyVhONi/MxtZpLpGmScJ5nTcMkRTT35+jdb2TpGagrOnk4POJetCUvUyEpvzOr+YOZG8jMcDqKt/Y/O+9adRtyflQpP6D727YZAknwmoTEkAcaJyETP7eEctnQutVKHLXm1zQCGTPUYdpceneSqQyO7jZlQZTn4fkyCfX12zNbLlnW1Jc3xhJNCn2QtMW4D2r3jDkw+WQg7QyJ0h7xqdh/rrS+iYkBOF98lfa/UmS+a9L0bVhl5a/79ijtJfSvvWxWLgBLb5bnc+AVE5/Im0cnFiPhiJuqacyX4TAxEEa5enYyPAtQZS7qU8US7vjh4eUg8fRxTZsAFw/bTRj+lLvHUCry2bx32H73ihiKGpJnn2b1t8pS2Wlxi7iB91k3jPRceVE61OL9Z+hXtTe8K/GLIZ1rOPaagN+nSkuQ6DSUBZYpIKb+R7Q9uJyGkHLawi/hZgVJUAq2py1BR9hPFHc0S0YpmBv03+UMfKfHlDj9WMDhSBBumgxEwSUX1BOJ77V3dX04WcWwF+gbJ2aPByCif6/ixVsD2uwp/eCRoBOo2Yg1oo6SVe0OoIQboKftlUz2AdcRhe9eyge2ClCQfh6BpBqHmLh0E/Y9jkck= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BY1PR0701MB1722; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 4:4+21wNDA/AD5euBjnJEqSDx+j3Ft1e3Rw9fOFEgxxkrTbQ/9EjDePPLraPOHSn6gc3gxpQFVpXZye9YljfL/NZBlgItaqpeAAuGZzewjHCo/7Dlt9XJkBRuLh4B82UodMR5qAE6S0dDPgejVMg1HWx1gQICjlSSEaLrfjFYWuBj4zFk8js7CKh8ykIxFqSnhHI/9871KypYpwFDttHKeAge0Jce/x8viX2/IZ2WxA/7b6pV3dSNX7l52NB4+AW3UjmQWKhfEA3aHns1z2TD4duocPOJwy1kpfk2SHV4M4KWibX+wXho0WnKUrLjqnr4id6spt7eHxWBj/AbOzLAHNW8KKrV0ynB+00K0CHfwGwnhQCcqZwPXeqa+PoBiOc8E X-Forefront-PRVS: 09583628E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(24454002)(47776003)(5004730100002)(4001350100001)(77096005)(46406003)(33656002)(83506001)(93886004)(76176999)(5008740100001)(6116002)(3846002)(23726003)(1076002)(81166006)(50986999)(586003)(2906002)(8676002)(66066001)(4326007)(42186005)(61506002)(50466002)(54356999)(9686002)(92566002)(2950100001)(189998001)(97756001)(110136002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1722; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 23:cLUcVXNzvQl+uRr8mhzDja1Xiz6l6q+hUhTYiyGEL5JfDkuaVjsxjaD0SyfTdAEryNmMun+tdQEJ/CMQvx3W2zHUs668GuhtRj25n5EBi8O4FEYLROgoAN7lK9sxcB4O3bGkhuTPl96gPeBMiXuJo2p5fc0nYN34juLCKjW42OAeukqSTBDdfaVxhDXyhmscqSRT3AmpR/2Ua76rUbAuwL8YHZ2CX2KsZd38/An7xjyAkAvp0YiiJr0rCU2oN1dhAr3e3rBzcNvnBro1BvEnZ3JEeKFIgm3dARR5GGU+aAMPxanpTv1qiaGYVdlhpeBhhgBuhy+USbN3JTUljNkTJ7ZhViK4KuOydFS3J6VMVNi5DkvZ9b8wwZe0jkFSxFrMsqzvKBtwIOctSHaeTVIAx8N9BJX0896OcSknX8IVgt10Jibl3t6QgXJoI+Ft5f2E6C4Aj2ETlSQ24AWwcCdA/GChEJPoJxTAMg7h6iJ6/6Vv58HZHUKlcQyF+SrzUX8PITe52Bskpted6ajawwiIA0GAwbowxiWSRe2MZR1NHhJPIQHoaSbE8xOoEMYjoFyGWGEo12A4vM5CQQWOFAP8mEDEm89cH3FG4THSm52QnNwtG+fXnovm5egxDW1buiSVw0cQts2cxDf/7KmgJPj3+cMxMY9nQ324K7lt5OuZb5VZkpy6Mih2GFxkNqkUdYsz+bi81wILoCjs/PccIrrRdRTWCMHdoZQUDuPDA9oaOdT+d2oBJzXNU4a/TpsKZuBb+OjduyPh1CR2KFy5coCGh6F6FSDRjxFl/Y+YwajcqwxYOBYinxVy+vNvAo142qF1Vg8qF+ukmQ1qSlyLpC/E9Yh8hmTA3+fqqDFE1MXuNoua4+EPzv2WNTnG7vWjFiTpvra2fTJNIpFOEBfmB5t5u0F8Kt9wdDZMPOSPeFhScjsWrFdhwmHa6NpB/olJDOZN X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 5:K5YV/S5eq2cx31boupy3wfFWSFFsMr7XFYyEQxK8+7C6gyeLWU7IdGKENOdFlOviwOs9AjvTvdJUZksrdYkDXZJFXMhgN7/88enzslQgr5yIezPsFP8GAi6kTA+E7xVzPm2whDBTtx/FuydQI4Lw4A==; 24:45OHXnmjaJpGRtYVfHK6cWWxtO4iVMo9eyWH0fxwR7ohyRB4GQ1u/vCh6ZxSe46uSGNasyPSPgZpANZ/GW4cCkIHen9LJER6KljuZj1BtBc=; 7:gysPEX7Vk1NdRT1xIWbnuiVfXsmq3N+UXLhopxfyzek0ilnP7Tk/gyZ/MEkBTydYPlrSQG1kb1gIf5W8jZHDliKR9ibz+jtQ1IO8Z2FRBOReRag35QYy9kveAgzXGAP+i3gNTffUBVE8lKVchE45EGGUqwGskTMpT7d58kzCU8yxqtt2KJv7wx8F6Wqk/16k SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2016 09:41:56.4179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1722 Subject: Re: [dpdk-dev] [PATCH v5 1/3] mempool: support external handler 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: Mon, 30 May 2016 09:42:00 -0000 On Fri, May 27, 2016 at 03:44:31PM +0100, Hunt, David wrote: > > Hi David, [snip] > That chunk of code above would be better moved all right. I'd suggest > moving it to the > rte_mempool_create function, as that's the one that needs the backward > compatibility. OK > > On the flags issue, each mempool handler can re-interpret the flags as > needed. Maybe we > could use the upper half of the bits for different handlers, changing the > meaning of the > bits depending on which handler is being set up. We can then keep the lower > half for bits that are common across all handlers? That way the user can Common lower half bit in flags looks good. > just set the bits they > are interested in for that handler. Also, the alloc function has access to > the flags, so maybe the > handler specific setup could be handled in the alloc function rather than > adding a new function pointer? Yes. I agree. > > Of course, that won't help if we need to pass in more data, in which case > we'd probably need an > opaque data pointer somewhere. It would probably be most useful to pass it > in with the > alloc, which may need the data. Any suggestions? But the top level rte_mempool_create() function needs to pass the data. Right? That would be an ABI change. IMO, we need to start thinking about passing a struct of config data to rte_mempool_create to create backward compatibility on new argument addition to rte_mempool_create() Other points in HW assisted pool manager perspective, 1) May be RING can be replaced with some other higher abstraction name for the internal MEMPOOL_F_RING_CREATED flag 2) IMO, It is better to change void *pool in struct rte_mempool to anonymous union type, something like below, so that mempool implementation can choose the best type. union { void *pool; uint64_t val; } 3) int32_t handler_idx creates 4 byte hole in struct rte_mempool in 64 bit system. IMO it better to rearrange.(as const struct rte_memzone *mz comes next) 4) IMO, It is better to change ext_alloc/ext_free to ext_create/ext_destroy as their is no allocation in HW assisted pool manager case, it will be mostly creating some HW initialization. > > Regards, > Dave. > > > > > > > > > > > > > > > > > >