From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0075.outbound.protection.outlook.com [104.47.41.75]) by dpdk.org (Postfix) with ESMTP id 27D6F37B1 for ; Sun, 1 Oct 2017 11:29:37 +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=Yd9LVOjzyTNWFrgDtx2Lm0wAtmF2g7BJTyU1F+mihQ4=; b=ZF/MKrE59DX2EX4t+SnbqAz3HHRUkVjIzSxVabPZphtvM+H+Cvt7dYP90opeZrjsmjTrl3iNlL2lsZNj/TE4W2kluzqrtq+Hir9q908+mSlb9gX3VOMmbjf7Y7B5GDvE6gNIq5Oay2ZDEuS8vWlA2ewJjojI3uaLavtRJ17ouyY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sun, 1 Oct 2017 09:29:33 +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: Sun, 1 Oct 2017 14:58:54 +0530 Message-Id: <20171001092902.10842-1-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170907153042.30890-1-santosh.shukla@caviumnetworks.com> References: <20170907153042.30890-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (10.174.208.145) To DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e47e82c2-b091-4c99-4d32-08d508aeee5c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 3:jZ5HsIJhObNOOQ9PSV/6GFty5DRg0+CA7oGlJPEDP8KeMcs8pKPOyMNz4wSVTzeEuV/kkWkbw/TKH4T3kQmGFcZqv23Uc9aF0uZkMTTmuB1rq6wbmkiJJooMl2w2Mj5azmNAm/aSkbs1W7TZrJwsa4q+DLa1VLG7dIVJoQL+EEHR0yi8Laoy483zGQ8w8E65ePjilyl12eM6SypIUnBJ7yRQM1nR24VX+wsGMn134kYZl5vWpjy3GJ+b1a7rWInt; 25:s2SG9uOacprvFhZq8sOOZIe8tR5BF3t11klvTMK/s/DkXTW9ewh60Hos3KKRjkawestuo/4zBZNbs/OsYAQRYfvVeO6HJy2DkbTmofAUeMgtDTbgRshj44sMOhSG2jXlxI7Smx0qCjnlS2lxpzZxA6FLZg8bZfKZsHvrFmNHj7TsksatgLSuay9D7nqfWPaz3QXTSK067V135bY3sIqOKYXqayJzhgTzRYWKxaiTmxwFPZbAXy9x9r/OeTQm+ryQDmpD10ncp6YeCagq9FOVJyql1YO47xH4Su5IYWFhfi/EOVqcYkVTFuZkcklpv9XuNpGIxZb6SRo8Cx/hraslOQ==; 31:UQJ7Q+iUNKap1Wnyyg2GrwQn3zB5VWsLB5CGk+2bNSa4YtkBL9uqtrvhEVzCeJqikQEJmnKg1GGDwgvglJgtesnPGlxOG9ERFXdGNdcnQ2nL6yn0ZPBSVQEwBF8RoIS2pOiglMJj+9mLMP2XRgd+2GniWf5NyK07ZlD9WBJ2nQ1I8qDLfB7nonobi8c04CsKeb/+FcnGxHO9a9pwuKd6hiYqYTy+qdqroS5o30kf4VQ= X-MS-TrafficTypeDiagnostic: DM5PR07MB3098: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 20:K5v8Q0hx3R6SQnp35usKCNTyhY32w0czGpSm1pMKM5juPSFEqFIlSLVUfmiykGuW6d+6xQ5v3ocC+8AMBQv5SX5IYVqecCv+Qt4E6qHiqMVn8/ua0o4G6zyTa+UTGtyH2frFQ03s4l5KGNPkcnxnIMkol+qik8uVYZ74sekE+CEEPzQvnCSn99LRSFYrXRdhdaECpeBUsrapZtnZduHNEOUjctxBCT5nI8ZJKcoh4K//ZoHvbbCrXeV6WXVhL3ld49v+UGL7sVzagLoVhP1DsWUukxa2ad00ZNV8/MgKveH3ypx3jSe/Qc0up9XThLdN7++9A68aXz5V+gl9laYoBtu+QDBKDVMMDafGH7wOXG/lcPcbuZEp5ldLTFS1gp1wildoBUtBbkw3KYg7AUtoSNP8B8QoKhZfwx3sgVjEc6Jz1vn00VcKfkU7NPNn5iWwCYuvWRkrebpxGY33qIOAvZnC5k4yX7YdSCo4YeXvIwNpiEpxLynIDO1HlObBrQNSRHfMrHTzk8JqBxJSfGQL1Qz7Ao83h4J83JQL3/a8WNqCKoBPYc7mbTVF6YTYdJuo34Imib07PiP19fUL4fZ45xB6oPIkgNzB5nP/waTQ70E=; 4:3EomcQ9LcBmLAHlBpmJSZJl9l76CO4qjJajJeVvkos0Mm65mrGKXzPSW/3okKO1qJeLRaabxFC2sMxqPwnsIvc8Llwvju8qn2be4JIqoK+qKoVXhqA5hv1zF+IK95Axm0Ppza/DeT7ht6CM7na8nRUg3ZzDbiSViWlY4vyrIQmYT0wmYmDCVgLuTAPsiyoexPj9/S1oe+KNJR7hqJc9LjBfrMY9aiCmEM3mNmt12wGV1r78UtbpEJJkcyvXWcncH 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)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3098; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3098; X-Forefront-PRVS: 0447DB1C71 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(376002)(346002)(189002)(199003)(101416001)(478600001)(189998001)(106356001)(966005)(50986999)(4743002)(81166006)(16586007)(81156014)(8676002)(72206003)(68736007)(42882006)(50466002)(8936002)(5660300001)(16526017)(48376002)(8656003)(2950100002)(2906002)(105586002)(66066001)(3846002)(6512007)(1076002)(36756003)(6306002)(47776003)(316002)(76176999)(6116002)(4326008)(97736004)(53936002)(5009440100003)(25786009)(50226002)(6486002)(107886003)(6666003)(5003940100001)(33646002)(6506006)(305945005)(53376002)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3098; 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; DM5PR07MB3098; 23:2L8eeveVPl++pkYxLoQc8YaxtxYnGPqCcoClw2Ms1?= =?us-ascii?Q?OM3LleWerB96KgGyrj/cBbb4Pi+ZzemrLvNb6Db725ExEkQciIx7GOKPt/0H?= =?us-ascii?Q?n+XMHwKv/mp08SmdS5t2CZISxBLrW5SU/ROqWGU8zknoz8OSRsTfoogcw6uZ?= =?us-ascii?Q?qNIaGYM0Vzhs2y065GoGacqDN08RKHHgCWqUfYtBh9fzWjhBX7GKIOoxMDhR?= =?us-ascii?Q?5i91KAILL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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2017 09:29:33.3790 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3098 Subject: [dpdk-dev] [PATCH v7 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: Sun, 01 Oct 2017 09:29:37 -0000 v7: Includes v6 minor review changes suggested by Olivier. Patches are rebases on tip / upstream commit : 5dce9fcdb23 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: v6 --> v7: - Added mask (flag check var) in [07/08] (Suggested by Olivier) - Incorporated comment nits changes in [08/08] (Suggested by Olivier). 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 | 60 +++++++++++++-- lib/librte_mempool/rte_mempool.h | 116 ++++++++++++++++++++++------- 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, 207 insertions(+), 58 deletions(-) -- 2.14.1