From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-eopbgr700071.outbound.protection.outlook.com [40.107.70.71]) by dpdk.org (Postfix) with ESMTP id E736558C3 for ; Fri, 3 Jun 2016 08:38:26 +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=uQmjqVy2btoAP/aJmdHA1LOltLOTBuoPDScWhuQeJPk=; b=VET47OrpzeEOX0IuSdM/ao8eGJ7o2wj6SdNk0jN/51XM/y1ICCA06P4yXnLnq4QvWl/NusLcAHMtuIlocj6qWDZd5FKWBOnN/RHuHNkYmgZ2Y7LzDOy56v9OIhIT647OjS+Oc8+ieGJmxNfI0CsnGjDyFr1jmDE4EXh2BM0SP0E= 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.39.39) by BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) with Microsoft SMTP Server (TLS) id 15.1.506.9; Fri, 3 Jun 2016 06:38:22 +0000 Date: Fri, 3 Jun 2016 12:08:00 +0530 From: Jerin Jacob To: David Hunt CC: , , Message-ID: <20160603063755.GA5277@localhost.localdomain> References: <1464797998-76690-1-git-send-email-david.hunt@intel.com> <1464874043-67467-1-git-send-email-david.hunt@intel.com> <1464874043-67467-2-git-send-email-david.hunt@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1464874043-67467-2-git-send-email-david.hunt@intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.167.39.39] X-ClientProxiedBy: PN1PR01CA0070.INDPRD01.PROD.OUTLOOK.COM (10.164.136.170) To BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) X-MS-Office365-Filtering-Correlation-Id: 99d4ab40-86e9-478c-cb6f-08d38b79a98e X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 2:ns3BhQa/T+62ZqOlfj4v4DVYaWKj9HibRa+yzqkifVaENShQGH4c9qUyVtZQPjTA5WpI0U/y0U8E1vLdVlTCvdGCdQEyIzUASUn+kPnmCGUhcBo9NmqPxjZdRMH2jO5wB534+SP+zdzQgJICMjNcldGxcqfqR/c9pOZPUcGR5yNOrcZBOaOAFwlqxsUjeFaw; 3:vtkmOEPnHYhCckE7YKF4QnIqnvtVNWolfhqUQgMQAxB155J/27cmIf8vcX40QImIM5AJ5SML9igyry0uQaEAl6PiMs0Fr7zlrEcPNaCiUwLVeLoMf7+6PZ++GIa03CL3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 25:urs624/g00RCKbfhMyBcnbtQDQ4X8nTf8eJmOQy8qSzaHr0XuMgUKLwozQXwS5JkrXFvnEJxG6WfQ9V8GVR2XXrPZog4jiB1lK5PYBXinHuUzd35wqDS0KzOeq/PM5LKat30depsx0vAtBqRKJ92fnpRtWfNm/oHWUc/qWDg+fIA2rlvb3DMU+UKGgfESybu5retqhBwFpqPrjqOBOrkUM1Sh+0rQZFd2shhGdfCLRVs24hcEk2dCsaRWdBExTpRomtl9D58bemoQEhh0xgKFFJLGBiTduShaR5QCRImMUMVX4/nx+wjvVT4PuLScdY4xS5h/qmpoOy4BOFPkYlDC4GhirS692qZF0sTEsJ97fRN3KnJcdnRwJChNSU7diaMcLYAErqWAO4N2W6lVZDYcSNmUlxVI9r/+RHBh0c2FfLEJyhylQqyMH5KxRijRtlJXOdN8gzE+gqbk09mW06x3wjoDMH40Nd+LRo+z3Hw5RT6yJE9yKzPGA+N++uL8LUlMvWo+dTWXp4SXAioQE4Md5jQ9fkjMzQEs9IbJzIhazfaPebXa98ztxkal/U1DL+FKu3h803gwehmS6AsDQ6TPeQskBH+3nu0Z7fnHgM6VrZLvKOgRtEiY8DOS5ZDnFYVkFsCIqsxNLDknYyWkBl6+nEVDSHWSwP+hGTz1UHIBkX9aNGvPehYozIxqlLISE6NbfkJWi3ZEEdNwWWy9AIkHhHAKhztF9nMCAXL/L4ho7gNJgf1TlVFEcY7xWFGl17I X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 20:38hekpxXDQdzyqGl72klrsEN5ZKKrgfiyyqxcw/v7mzmOSU8gAhfHeJUKrF9DFviFPHM+wUlDH/j7V0tNjo/o+gV1ZHYM/0KuprrKKUM3gIVsu/3QBIvO1g1xDb4FaMdMLKEmuU8UfQqKqZElyHWa9tlmYTZQNmLo0d3ZBlwvsSmshQ9lhmSqiRLdLSMO5uXw2sSlDHFYBGB+NLCO5sBST8dZKAW7pwsNXPM1NNC0nhFLMee3EzNhtVLPnqv70C3l0KdcwQxsvhqW3TETAJ9fMSs9we1Q8ZdKj9G7oTz7CcMZB5+fHJ02JhTwVO0PqAsNavfVi8/8ADX75nNjjWqZr4H3jgUenXYigLFIlMSUq+Rp/6NmM7oUv7Thwg27dB0Lo7osnRNytgbNny3G7quywQyl01jVToRYWTza6KN/vlkg2QPBKTBK4Gr74G3XqkP32ZFzEZxCLjqRsL/k0RXEVcK5miccvxNQZ+eDBOUDz/HXwc75mXIlO+EWvD5OL03HUs2EMt3mvbVPFYTXxu/nYVPu57r+IZRBwzEayg9opFx/oOg9ct9ikBLlhyZ6vTDwyBSETVUitGITITN0ILavTA1/BQF70CdoGiaX6sM0NQ= 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:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:NMhXuF27hU+W5dZwtjdLxpk7RvCE1CAG899dcFgYRo60V2cp8FjSiFet3LWMY5Iq81NwjOKBk9wdb2pZ/m+V2t4NDrYWa+m6xEB4QE9+NH7mLJTkHVLRdv0l/KNiwVLOGCF99j6zE13TFD9WvdTESAppo6WFCs4y9zEaV67h2OdIRWL1lzpzpjPLIM3FcFOvpuJQjOSuolxPRn0lhe8FSZv0h84r1O6lvs/yFDeoduYLQuycKGCUY+ke2jBZV7FyUfjRxg+AieUEvcRMUg0PLGUAx9XpaNGrjEjOSXl6FXrktNuum172cQnTxxIg0d7p0XsxiE3sxUh/fX9SY11oknw0XCbB/DAfT/XlnNdZb7SNPayoksQotUpKJwZsxbAO X-Forefront-PRVS: 0962D394D2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(24454002)(5008740100001)(66066001)(47776003)(5004730100002)(2950100001)(61506002)(97756001)(76176999)(77096005)(54356999)(50986999)(9686002)(189998001)(4001350100001)(19580395003)(110136002)(42186005)(586003)(92566002)(1076002)(81166006)(6116002)(3846002)(8676002)(23726003)(46406003)(2906002)(4326007)(83506001)(50466002)(33656002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1721; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1721; 23:2PtyHYhT0IDx5KOZBg81N5c26bIouSiJsKGFPKC?= =?us-ascii?Q?ZgqVB+OM86zQpzNXVe3cbR3Rr/vzpCbnfTbTFkZsO35G3oBwG8PdiX95BQNa?= =?us-ascii?Q?qVbIlxXYXiwuv28sQfycKgA4NZbrYNqdzsXG2qOj1RxEk4OJSBDV/bV2TqN9?= =?us-ascii?Q?9d5HzjMmhacYoQxPUbMc0Ha0ZMbr9+U58YZHbLSjMnR1mh15Rv66VpbOM9RG?= =?us-ascii?Q?vudMiWxPeCs4zwuzgvkWdhYxevkHKdM/R2wBz0Mte3mNGSeJ47psoKSLZQvK?= =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tQ2MrWfIL0xSo+jHC9YlqBqFj0AMWhumTz08lUsqmnVOrpMIM4Frk3MvIdNF7DzKWh3X6d/Fqa82f8qluX0qUZYYdK2C2jOWo=; 7:3da2jvJsLAShA+vZYU9LqcLeyEHpmxwWzvfVTYj34EwwUMrdvdsrmOtn7914ZFE6aP1fT2x53qqyHCWKCmuLHT3UB/w/8vzdFk6jmZKhwf3y8hjCNhKihe2LiOn768e4sSxdtogjexKPY2j/lnMdynw+c/0EIRirwCJrvforbYnCNRKDliLbFHJwxdzyz/BXk/lYTKZyz4rbZ+woVrM2oDubGzjSz2YucrqbO7WKq0E= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2016 06:38:22.0288 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: Re: [dpdk-dev] [PATCH v7 1/5] 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: Fri, 03 Jun 2016 06:38:28 -0000 On Thu, Jun 02, 2016 at 02:27:19PM +0100, David Hunt wrote: [snip] > /* create the internal ring if not already done */ > if ((mp->flags & MEMPOOL_F_RING_CREATED) == 0) { |> 1) May be RING can be replaced with some other higher abstraction name |> for the internal MEMPOOL_F_RING_CREATED flag | |Agreed. I'll change to MEMPOOL_F_POOL_CREATED, since we're already |changing the *ring |element of the mempool struct to *pool Looks like you have missed the above review comment? [snip] > static inline struct rte_mempool_ops * > rte_mempool_ops_get(int ops_index) > > return &rte_mempool_ops_table.ops[ops_index]; |> 2) Considering "get" and "put" are the fast-path callbacks for |> pool-manger, Is it possible to avoid the extra overhead of the |> following |> _load_ and additional cache line on each call, |> rte_mempool_handler_table.handler[handler_idx] |> |> I understand it is for multiprocess support but I am thing can we |> introduce something like ethernet API support for multiprocess and |> resolve "put" and "get" functions pointer on init and store in |> struct mempool. Some thinking like |> |> file: drivers/net/ixgbe/ixgbe_ethdev.c |> search for if (rte_eal_process_type() != RTE_PROC_PRIMARY) { | |I'll look at this one before posting the next version of the patch |(soon). :) Have you checked the above comment, if it difficult then postpone it. But IMO it will reduce few cycles in fast-path and reduce the cache usage in fast path [snip] > + > +/** > + * @internal wrapper for external mempool manager put callback. > + * > + * @param mp > + * Pointer to the memory pool. > + * @param obj_table > + * Pointer to a table of void * pointers (objects). > + * @param n > + * Number of objects to put. > + * @return > + * - 0: Success; n objects supplied. > + * - <0: Error; code of put function. > + */ > +static inline int > +rte_mempool_ops_enqueue_bulk(struct rte_mempool *mp, void * const *obj_table, > + unsigned n) > +{ > + struct rte_mempool_ops *ops; > + > + ops = rte_mempool_ops_get(mp->ops_index); > + return ops->put(mp->pool_data, obj_table, n); Pass by value of "pool_data", On 32 bit systems, casting back to pool_id will be an issue as void* on 32 bit is 4B. IMO, May be can use uint64_t to pass by value and typecast to void* to fix it. Jerin