From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0084.outbound.protection.outlook.com [157.56.110.84]) by dpdk.org (Postfix) with ESMTP id 645CA3B5 for ; Thu, 9 Jun 2016 14:31:02 +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=RGaJ3zonTnsJjPW+FnLU0xhGKkNlNMX7P/WXsHAZanQ=; b=VC+sFUmV1Cq2FB1o0NPfv1dwKOBlEGZdQc6eFt+cLCrs15sQV4MsiRmusXmPLUyj1DfYB+GABTNPrA0opbCt5ovOinNgR8Grdpi13T3w/s0cgev2lEQsb6WsRV2tjQjHW2X2/zCwqZ4drCxMVHwOJN9GbmrKmA+pTnp/qh/lVM4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.172.248.65) by CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) with Microsoft SMTP Server (TLS) id 15.1.511.8; Thu, 9 Jun 2016 12:30:57 +0000 Date: Thu, 9 Jun 2016 18:00:41 +0530 From: Jerin Jacob To: Shreyansh Jain CC: "Hunt, David" , "dev@dpdk.org" , "olivier.matz@6wind.com" , "viktorin@rehivetech.com" Message-ID: <20160609123034.GA30968@localhost.localdomain> References: <1464874043-67467-1-git-send-email-david.hunt@intel.com> <1464965906-108927-1-git-send-email-david.hunt@intel.com> <1464965906-108927-2-git-send-email-david.hunt@intel.com> <5756931C.70805@intel.com> <57593962.6010802@intel.com> <20160609103126.GA27529@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.172.248.65] X-ClientProxiedBy: BM1PR01CA0057.INDPRD01.PROD.OUTLOOK.COM (10.163.199.29) To CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) X-MS-Office365-Filtering-Correlation-Id: a6db4c36-db65-456b-d403-08d39061ea39 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 2:YY+I2bgLg7x3UYsYBccTH4F6Fyc9Dd1x2ia/qA3iZMQBcuRfRhaITl5b6lvG0GxCLKcee05lnyCbi/5aj5RjLUBDzokAxNDKd2SB4Yvwn0mdiWj+V+z/jCvE039/SHTnzemAjhesTcZ7wAhpTFhArcCgedYb4IFKe7Tzy2Vn0QjksLvC8omjN8L7OTvrNi5i; 3:8nsQeebSeFdcdWame+fgUnw6WWusB1HZ7Rs8mssIyzwAjJeALbdztn0mEgKC8zE8RolhCFIZuBgkmN7NjfIVi9vvuf0T4I1CCfJ8L59C9KLZTgCLcnSaAryFhXENvTSh; 25:VtyxaydIenP9uy7vAUt9wbd64qj3jbrzVc9j8oqH9pCq9iWr7Cz7U0drK9jtyb7RNn0YCkhHJAD/ARvrZXA2apXloBdU+9zyOYXz4adRwVjIwW4hOnevIozATVzhIpKZchXmL6oJ9Xc3idcaYuDj9qWeHUNUuFOPmK2iwzZmNmzsLzrjS8xXGodswLEif7iz9zw22J7vnAU6wVvOSJb9XgkfBqgZp5psfUwXrQ18XIgHxDQ3pEa9+nbXUI+JVrm9I1xTjsm0tWpIaZ8mjz17RS+ojoc68GxGF8UrgXXLk3VjN5bX1gr/Ub+CThOMO60hsimVOpsXG9s4IKB5eVjX+QV8M1JP3AdutvpDvnClreOWBy54kgTSTXSFSFQqIt5b634zWTLfBzc+qgyij0nUUU7IT9Y7OnRAeGGaC91v8RA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 20:DXpxEqUj0K6xooHHukFDYVuy3uf0YtDZbUkgvhjmt+6/OUqzUJknV81gZjcL7FQRbKfHvOqvBZWEq7NzTuMXNhGXNL6vm+FpaZ6f0J3FAXvHdkzhFX2/OaXMBAFG2N12nY/n47WyOuDgjt9pvnlEtVovRjbEeDHtHkeBRoq7xVKpegKg5pixbI2qvcGKEWaiGa6+Fo5+nuzk58XVW0QZuBY6Vrbo13GIkl4EhYxH+wdiJExBlLNb9YGBvmf/9pEz9elZ22GdQabLD5fNK2ossBhdSHCKkdVCaXOMex05yw7YyYO/s1eDqZVGSbi5llyqTA6OgrBgW1WzYmBxTPi8ekElbni+3KBKleicAI1e8ZsBPKU7qFfmV0OV1Q2CYQPk0Vg3t9s4fUwDzK1R8VoS/uphiuitcxqcZlLnbiOQ8nle27U3P/C76g8ZyxXP7L0LKfJD6uhr8Z8VKqDSe+BAmGcvdQIOWSFHid9NY4PG1SsyErcqmiuItwT5urdcKb8h7gIIGvWt3tw8YBkDVreBS0QJ0n5jDWSc6Qm9XkaRi5rfJ5QYgxAJgPauAOjlTEU/bmI5+mgx4POOuxvtKEpIyyCoZ74Figg6Jx29/e3FEd8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR0701MB1726; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 4:WKLABGadcCjUG4+lYSlbuAc0OsEPWLtWJm02pyC65i0gQARpQkEViG/2d5pZca0e4HBqnQS5WzopZ80k9Iop5/CnSEtAH8s0km38tm1TLFKOsFcRp7sm0cuMZ9J4KHalIySA3ax4ukZ6l5Qe3JJ9i8873Ks1cQ57nEmDvmiPeH+d1fezdP8eELkwx6fIOBu3xdZuRi2l14MkRleYabA4oOAEchnHLSDYQMutW6fFYIm/TaYjWaLJu4zuHeh13gCBhWjclEWZEpZGJxPIHnK3LX+/wPZ3v/cQry204It30NTJ7ycz9F8MeKodZ+ub6Zv5lNQQY9DddDmeHrvwIylWtVpWUl714Zn+mfHe/jP+xFVorIgZXpS6z++GLbOqByHzlgcw/HgJ350xflBJeCWlb+wVQ8lfZKXNIM10v6bh2z4= X-Forefront-PRVS: 0968D37274 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(189002)(24454002)(199003)(4326007)(42186005)(9686002)(61506002)(23726003)(3846002)(586003)(68736007)(1076002)(19580395003)(93886004)(50466002)(6116002)(5004730100002)(97756001)(83506001)(2906002)(46406003)(2950100001)(110136002)(33656002)(97736004)(76176999)(50986999)(81166006)(101416001)(66066001)(5008740100001)(8666004)(8676002)(54356999)(92566002)(4001350100001)(81156014)(47776003)(105586002)(77096005)(106356001)(189998001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1726; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CY1PR0701MB1726; 23:0YOIhgj4plBW1FyMEC7xXwgM344fqiXPeesRj93?= =?us-ascii?Q?r1F/dkxukrkvqVDClSSBgCjQmHscgoUF5f5mUvNMTQweGUlqd1uwDSiljeVD?= =?us-ascii?Q?y5Y/AQYLGH064o4rD+m8MoLnh31+hZOQKobDvhAuqJRvH+zmEaMoiT5CkgDC?= =?us-ascii?Q?QVTa0fZg7FXrIhikIl6rrHsh5yLN3JjkYIEwmvqh8CFmNE2tNl15qUE9nwdo?= =?us-ascii?Q?76kI4WxJ667lSyLRBzpDZUOS0P6ckB7w9Df7wQLOBPU+Im7yn4aRgCfJJtVv?= =?us-ascii?Q?4MBIg3B8Dnvw522Fa4VUi/849JspEPM0Q+XdmBrJJFlJMD5fQ+Pc1hnaRwQF?= =?us-ascii?Q?+Xh3E96LU0gRLkv+HTJBfH66lpl1qvBVYtXSURCch0BaFJugfS1WPXrA5FyH?= =?us-ascii?Q?Ca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CQfLAc9FSiLr6vmPlxOufzkjcy7ifO8uuz2s+ckyC8u1bG/NeHTtxSDx3/emojyL6/DSAcW8MycEw==; 24:CUatc26n5LzKTUwI3bBqN1jDl4k7inES75e5t+FMoXUf2j0DdwitZVAh5s8F/ebSCuZ0HWZ4vyDFbRTyfG1bmAkWNmzDfNPHwLr30jVmJB0=; 7:RPl2xlo6JK77dXKhoyNgQVK7oicDDYMVfc++eIiMLyYyGAQNWS2kv2aAJUtaRoQLIpjXEoikHCOOAbfupr2gDC8pqv3PoIIUSHT1cDlrFYFdhxP0P9ZR+P94s31e/9ju+zxuXeNlAOGgvOX6TCGYMlxoDl6KgFBfpr9RQfyxFZ1G6aAgIrMaRzHKEpkzHOBrOYV3no3X2oKrQAzoYbLvfw9XgLBQxHS5AXF0VOukLWw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2016 12:30:57.9787 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations 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, 09 Jun 2016 12:31:03 -0000 On Thu, Jun 09, 2016 at 11:49:44AM +0000, Shreyansh Jain wrote: > Hi Jerin, Hi Shreyansh, > > > > Yes, this would simplify somewhat the creation of a pktmbuf pool, in that > > it > > > replaces > > > the rte_mempool_set_ops_byname with a flag bit. However, I'm not sure we > > > want > > > to introduce a third method of creating a mempool to the developers. If we > > > introduced this, we would then have: > > > 1. rte_pktmbuf_pool_create() > > > 2. rte_mempool_create_empty() with MEMPOOL_F_PKT_ALLOC set (which would > > > use the configured custom handler) > > > 3. rte_mempool_create_empty() with MEMPOOL_F_PKT_ALLOC __not__ set followed > > > by a call to rte_mempool_set_ops_byname() (would allow several different > > > custom > > > handlers to be used in one application > > > > > > Does anyone else have an opinion on this? Oliver, Jerin, Jan? > > > > As I mentioned earlier, My take is not to create the separate API's for > > external mempool handlers.In my view, It's same, just that sepreate > > mempool handler through function pointers. > > > > To keep the backward compatibility, I think we can extend the flags > > in rte_mempool_create and have a single API external/internal pool > > creation(makes easy for existing applications too, add a just mempool > > flag command line argument to existing applications to choose the > > mempool handler) > > May be I am interpreting it wrong, but, are you suggesting a single mempool handler for all buffer/packet needs of an application (passed as command line argument)? > That would be inefficient especially for cases where pool is backed by a hardware. The application wouldn't want its generic buffers to consume hardware resource which would be better used for packets. It may vary from platform to platform or particular use case. For instance, the HW external pool manager for generic buffers may scale better than SW multi producers/multi-consumer implementation when the number of cores > N (as no locking involved in enqueue/dequeue(again it is depended on specific HW implementation)) I thought their no harm in selecting the external pool handlers in root level itself(rte_mempool_create) as by default it is SW MP/MC and it just an option to override if the application wants it. Jerin > > I was hoping that external mempool handler would help segregate such use-cases and allow applications to tap into accelerated packet processors. > > Do correct me if I my understanding is wrong. > > > > > Jerin > > > > > > > > Regards, > > > Dave. > > > > > > > > - > Shreyansh