From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0084.outbound.protection.outlook.com [104.47.33.84]) by dpdk.org (Postfix) with ESMTP id 3A6C5FFA for ; Thu, 7 Sep 2017 17:31:28 +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=+A22Iz7PO66qSmKaQ7/22wUYIx1z8qAfYxFvnW1ktxc=; b=gJVUw1rDS4p/BIzCQvdN0dXl1mAliWeI9Xt6VwrblnoZJG0+uUbVSGjr7b1wKGda4w1h4yZ65BJgeOCVZ9VxqS6hyY40YNFJvl9iVR5M6RPCcCe8n1Mnk+kDnpKwqMsyrWyz9CqvdpwyK0NEIdtdZxFKJu5atRMLnzQ8zH8aTXg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by MWHPR07MB3101.namprd07.prod.outlook.com (10.172.95.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 7 Sep 2017 15:31:23 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, Santosh Shukla Date: Thu, 7 Sep 2017 21:00:34 +0530 Message-Id: <20170907153042.30890-1-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170906112834.32378-1-santosh.shukla@caviumnetworks.com> References: <20170906112834.32378-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0072.INDPRD01.PROD.OUTLOOK.COM (10.174.208.140) To MWHPR07MB3101.namprd07.prod.outlook.com (10.172.95.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01778ccd-a43c-49b0-42a0-08d4f605807c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR07MB3101; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3101; 3:Q9XFATYcjjt5qyuCNnCSItyvGRcT622YZFx8g8Zvqe6tZKY9mhfnhg3tQm3k8/jL3P/8P6IxvxKo6Lw+0TLKBGvvVifD5brV3jpGhb8v3T7eX39VJQdMb6WKggwKYICuXd7F3W+wh/xTePl8P1K8iKFVFDvk5Eu3aGe/or7dP6VLZE91rJskoK9lWuQIvVAspqteEv8abMQs8YSyBtT2XQi1Ko+FNNFr4mlqCQdmKLusqx0c7xKGhpDndeEeJ5JP; 25:PM3ibFoz0eb3hl3qlh/xjLnTeAbcTUNC2ZqG2BDOEoM7KHSRshT8E4CUR6JeZ4bErnJ+y98DWjWNUw1kPV9KVec53xZW1xBiuyyqdp3fUpj+SIWaSQIffAh7MDMOpVHTxlomYSTovVw+oW3oxlkkJaDQCOSLr5X6HIDUp7xb26j5ipyEEYvPyF8oQ04CGek1Q9LjRolwBMp7K/lJteqEQ4BU1ktUGdIcvHHWhtzlibTM1DctOViW/2J9fbZGDs1z81azrXHqrOgOJUrXkz0//RE1pX1RXRT8+IS3ERPLjfTqyFe5RR0sD0vTgvrTF6Y/XdJGiqcXX1fUVnqs6VYElg==; 31:d20p81UwMnlxdRpk9cUf8S/z1rwcTyNLJalUBxlq5QWUcS+iodfMuwb8PZrHSZoA1sKS/m4mAdSttdrHaFUkSi1NmAuVXsgrk/VLZWAUr6LwphTxCEYtRmpu4jcGLDy3s4iEotMHlensQU+v1nqapjAAZTCBQaoVUFcjYG+ebS7zfneUlzUJE5d6qal5w/B71fRsS4hSle2HurrijIY+0c2kufZyy0DfiUcxjC5dw7k= X-MS-TrafficTypeDiagnostic: MWHPR07MB3101: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3101; 20:YHASeQ+7Hlvo4hChIJEBi+w+gbRfzkTU+OzOZ9xwIxGM8mca4m6LoFEOcdm69FITVH/4hxU3DoDyI3RAtxJgcwqPCHHPe+tDXzpTfFq7eeEXdE4NQga6UedxfZcbrm8CFfGsHk5O96We8izKHmnqH86atSZ2LNvx9exRwGOhuZo8ry4phhQCQbM7e1lheogfcdM2ziv422NJsi1pfcyntsGZn/3z+VvWxUID/AHeJB9NM2vGO8xoIVjGVpdhkFJTegSIVkqGXLRDftL4hyvfdgP1yPbDYu9MqV1ywrFb1LuE75nley99lzY4cz4WL4Pc09qTQD9IjMMk3KmoqNKi6bZc0R9N8Er9R6nb9pyk68+QJFlaWHGZ+JCX+fDJCZQil9LwnlVJh3hpfHc16b/JjWktXgzdS8lLpEUVeExWOXSIzT1U9J87c/CaCO2ExMTkNUgl/ztO5HaKIJ4I7t3eGcb5ChJC15bQAhQ1f3rpV9EWOkJ/WjP42TSyF4vyUlazyB2yCsCb6kF3sl+6v6uHxcxA8xLTV5/kSkWTRqOaOtJpxecTfyjRGr/SRoAMpXC8M1D2PZY/X83mVTNNef30NnJmZW+prZKhBiMks1yXLso=; 4:MSaDJbYePQZQX8t7/BezkHukjT9cjhVqYNV9QbfGTWB0Zu9VNXy2J1KoK61CnJoafGvt/uQUpBzX9BVFIX7sSLHzaKMHVksogy267TILSJyPF5jDuGAwYJX3DPH8f9zxnSLRFZsTkDocK8nd/JIpR+3TbrQvSJ72jfajmbo6YncBRWWC483U2LmmsTFe6nzO/JWivsXLgSvdpK/lGmNLOgL00cZ0Pu0ggLYHNWZfFYSOZH3u8sS/17m+CxTL5oAg X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(3002001)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3101; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3101; X-Forefront-PRVS: 04238CD941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(25786009)(5660300001)(966005)(50986999)(76176999)(42186005)(4743002)(106356001)(105586002)(4326008)(33646002)(8656003)(66066001)(53376002)(53936002)(36756003)(107886003)(110136004)(8936002)(50226002)(305945005)(6306002)(8676002)(7736002)(5003940100001)(1076002)(6512007)(47776003)(81156014)(3846002)(50466002)(6116002)(5009440100003)(101416001)(68736007)(48376002)(97736004)(81166006)(189998001)(2906002)(72206003)(6506006)(2950100002)(42882006)(6666003)(478600001)(6486002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3101; 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; MWHPR07MB3101; 23:bB8LjJKDe9uyNsLBEAV9ukXXMCiy9UgzE4VBDmO5l?= =?us-ascii?Q?fnyNc3t1lVU1tmwk7Z07CTAK7P2cX3ZpQPs7HpHpE74jwRsQwjib+Dhfo0Vk?= =?us-ascii?Q?/QzZzgdwpb7Pf7YG1FkJYlOiAE8oeBo7EJEsD1oqywEJ6SKxk8SJPWE/StjG?= =?us-ascii?Q?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PPLjGwDBvvyE9BzoPPwhWuPGwjfNE5gOgEVdSQofr7bkpczvKBm4B2YODHRrWns= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2017 15:31:23.4166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3101 Subject: [dpdk-dev] [PATCH v6 0/8] Infrastructure to support octeontx HW mempool manager 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: Thu, 07 Sep 2017 15:31:28 -0000 v6: Include v5 review change, suggested by Olivier. Patches rebased on tip, commit:06791a4bcedf v5: Includes v4 review change, suggested by Olivier. v4: Include - mempool deprecation changes, refer [1], - patches are rebased against v17.11-rc0. In order to support octeontx HW mempool manager, the common mempool layer must meet below condition. - Object start address should be block size (total elem size) aligned. - Object must have the physically contiguous address within the pool. And right now mempool doesn't support both. Patchset adds infrastrucure to support both condition in a _generic_ way. Proposed solution won't effect existing mempool drivers or its functionality. Summary: Introducing capability flag. Now mempool drivers can advertise their capabilities to common mempool layer(at the pool creation time). Handlers are introduced in order to support capability flag. Flags: * MEMPOOL_F_CAPA_PHYS_CONTIG - If flag is set then Detect whether the object has the physically contiguous address with in a hugepage. * MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS - If flag is set then make sure that object addresses are block size aligned. API: Two handles are introduced: * rte_mempool_ops_get_capabilities - advertise mempool manager capability. * rte_mempool_ops_register_memory_area - Notify memory area (start/end addr) to HW mempool manager. Change History: v5 --> v6: - Renamed flag from MEMPOOL_F_BLK_ALIGNED_OBJECTS to MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS and updated API description (Suggested by Olivier) - Muxed _ALIGNED capability flag with _PHY_CONTIG per v5 thread [5]. - Renamed API from rte_mempool_ops_update_range to rte_mempool_ops_register_memory_area (Suggested by Olivier) - Upadted API description for FLAGS and API both (Suggested by Olivier). Refer individual patch for detailed change history. v4 --> v5: - Replaced mp param with flags param in xmem_size/_usage() api. (Suggested by Olivier) - Renamed flags from MEMPOOL_F_POOL_BLK_SZ_ALIGNED to MEMPOOL_F_BLK_ALIGNED_OBJECTS (suggested by Olivier) - added flag param in get_capabilities() handle (suggested by Olivier) v3 --> v4: * [01 - 02 - 03/07] mempool deprecation notice changes. * [04 - 05 - 06 - 07/07] are v3 patches. v2 --> v3: (Note: v3 work is based on deprecation notice [1], It's for 17.11) * Changed _version.map from 17.08 to 17.11. * build fixes reported by stv_sys. * Patchset rebased on upstream commit: da94a999. v1 --> v2 : * [01/06] Per deprecation notice [1], Changed rte_mempool 'flag' data type from int to unsigned int and removed flag param from _xmem_size/usage api. * [02/06] Incorporated review feedback from v1 [2] (Suggested by Olivier) * [03/06] Renamed flag to MEMPOOL_F_CAPA_PHYS_CONTIG and comment reworded. (Suggested by Olivier per v1 [3]) * [04/06] added new mempool arg in xmem_size/usage. (Suggested by Olivier) * [05/06] patch description changed. - Removed elseif brakcet mix - removed sanity check for alignment - removed extra var delta - Removed __rte_unused from xmem_usage/size and added _BLK_SZ_ALIGN check. (Suggeted by Olivier per v1[4]) * [06/06] Added RTE_FUNC_PTR_OR_RET in rte_mempool_ops_update_ops. Checkpatch status: CLEAN. Thanks. [1] deprecation notice v2: http://dpdk.org/dev/patchwork/patch/27079/ [2] v1: http://dpdk.org/dev/patchwork/patch/25603/ [3] v1: http://dpdk.org/dev/patchwork/patch/25604/ [4] v1: http://dpdk.org/dev/patchwork/patch/25605/ [5] v5: http://dpdk.org/dev/patchwork/patch/28418/ Santosh Shukla (8): mempool: remove unused flags argument mempool: change flags from int to unsigned int mempool: add flags arg in xmem size and usage doc: remove mempool notice mempool: get the mempool capability mempool: detect physical contiguous object in pool mempool: introduce block size align flag mempool: notify memory area to pool doc/guides/rel_notes/deprecation.rst | 9 --- doc/guides/rel_notes/release_17_11.rst | 7 ++ drivers/net/xenvirt/rte_mempool_gntalloc.c | 7 +- lib/librte_mempool/rte_mempool.c | 58 ++++++++++++-- lib/librte_mempool/rte_mempool.h | 120 +++++++++++++++++++++++------ lib/librte_mempool/rte_mempool_ops.c | 29 +++++++ lib/librte_mempool/rte_mempool_version.map | 8 ++ test/test/test_mempool.c | 25 +++--- test/test/test_mempool_perf.c | 4 +- 9 files changed, 209 insertions(+), 58 deletions(-) -- 2.14.1