From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 1E5BF569C for ; Mon, 27 Jun 2016 17:51:02 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 0471F2991A; Mon, 27 Jun 2016 17:51:02 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org Cc: l@nofutznetworks.com Date: Mon, 27 Jun 2016 17:50:34 +0200 Message-Id: <1467042637-22907-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466074939-29863-1-git-send-email-l@nofutznetworks.com> References: <1466074939-29863-1-git-send-email-l@nofutznetworks.com> Subject: [dpdk-dev] [PATCH v4 0/3] mempool: user-owned mempool caches 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, 27 Jun 2016 15:51:02 -0000 Updated version of the user-owned cache patchset. It applies on top of the latest external mempool manager patches from David Hunt [1]. [1] http://dpdk.org/ml/archives/dev/2016-June/041479.html v4 changes: * Fix compilation with shared libraries * Add a GOTO_ERR() macro to factorize code in test_mempool.c * Change title of patch 2 to conform to check-git-log.sh v3 changes: * Deprecate specific mempool API calls instead of removing them. * Split deprecation into a separate commit to limit noise. * Fix cache flush by setting cache->len = 0 and make it inline. * Remove cache->size == 0 checks and ensure size != 0 at creation. * Fix tests to check if cache creation succeeded. * Fix tests to free allocated resources on error. The mempool cache is only available to EAL threads as a per-lcore resource. Change this so that the user can create and provide their own cache on mempool get and put operations. This works with non-EAL threads too. Also, deprecate the explicit {mp,sp}_put and {mc,sc}_get calls and re-route them through the new generic calls. Minor cleanup to pass the mempool bit flags instead of using specific is_mp and is_mc. The old cache-oblivious API calls use the per-lcore default local cache. The mempool and mempool_perf tests are also updated to handle the user-owned cache case. Introduced API calls: rte_mempool_cache_create(size, socket_id) rte_mempool_cache_free(cache) rte_mempool_cache_flush(cache, mp) rte_mempool_default_cache(mp, lcore_id) rte_mempool_generic_put(mp, obj_table, n, cache, flags) rte_mempool_generic_get(mp, obj_table, n, cache, flags) Deprecated API calls: rte_mempool_mp_put_bulk(mp, obj_table, n) rte_mempool_sp_put_bulk(mp, obj_table, n) rte_mempool_mp_put(mp, obj) rte_mempool_sp_put(mp, obj) rte_mempool_mc_get_bulk(mp, obj_table, n) rte_mempool_sc_get_bulk(mp, obj_table, n) rte_mempool_mc_get(mp, obj_p) rte_mempool_sc_get(mp, obj_p) Lazaros Koromilas (3): mempool: deprecate specific get/put functions mempool: use bit flags to set multi consumers or producers mempool: allow for user-owned mempool caches app/test/test_mempool.c | 85 +++++++--- app/test/test_mempool_perf.c | 70 ++++++-- lib/librte_mempool/rte_mempool.c | 66 +++++++- lib/librte_mempool/rte_mempool.h | 256 +++++++++++++++++++++-------- lib/librte_mempool/rte_mempool_version.map | 4 + 5 files changed, 371 insertions(+), 110 deletions(-) -- 2.8.1