From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 09397293B for ; Wed, 29 Jun 2016 01:47:48 +0200 (CEST) Received: by mail-pf0-f178.google.com with SMTP id c2so11409926pfa.2 for ; Tue, 28 Jun 2016 16:47:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nofutznetworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5kccqfe+d9XnVTKv7tSdPB0gAWhKFwUJgppzyvchBNo=; b=btUiMI5U5WaGRAzDEKdvaoXX724QAYLbw7nLkk8Lj6Iw80NVuMx4sRDZMLnDCDNxIV tJ62VWEb351TxYS+eH1Pj+EJ0dAE2dnQzyNRnkM6m/Vp2d2IYPCT8bmCqPhUIuvPZjxt vrCEavV2OacOE7kKVEcuEcYO9TKNex/A3FdStGaNb6VY17eF32hfo49lhN2FQU2zhiIm mxEZv6rVg+4NyEXIRNDcrG1mvV4jRqlYUnjvGvgBFWysN1Ljqe9Vl2LI5aTylxZepCzM XLRIkPO327S7+CuJMYrcakcdnf2g55EihscZtF6ZOAqpCfJq5HqB1gBllFIa9yGjAOOG SoJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5kccqfe+d9XnVTKv7tSdPB0gAWhKFwUJgppzyvchBNo=; b=CWwdpM9jAka6UtVMpuvwmyp4GlNRw3KQ+EYY+GuC/1KxKvnDw/P0w6QuJ1NSt/Rcwo NiYgpkcMmk0X6/b5MXAcoazhFqBZYUstnHlXXk3DpEILkJNZFxoGsHvIyqKQIyDpCovu NqpQu2gtAS1b+w6yRl9qTI52OcRk0Fb17RISWUKbZjqqEcYYN6bP3CGw1c6CSQuYH4bQ KXkjCAKW7pORMMN+Vh8IrtgN3XHenrKw2spLBSQPEGD0ojTcLCH4cczrADjR9pkEDSPf F5/ZmGcA3SaMdbeKuU5wtZNKOkRHZKwOLlu7UxMuJovlb2Y/oKArh30o72Ff5Q0UgzTF YJpg== X-Gm-Message-State: ALyK8tI2i6mzXez48yWX5HWNKak+11OWQKqAENB2vmAzgNPXM70Y5qdJ3VI9dwwshHfyDw== X-Received: by 10.98.93.216 with SMTP id n85mr6384101pfj.36.1467157667124; Tue, 28 Jun 2016 16:47:47 -0700 (PDT) Received: from lap-3.2f30.org (cpc92320-cmbg19-2-0-cust3.5-4.cable.virginm.net. [82.13.64.4]) by smtp.gmail.com with ESMTPSA id p63sm608488pfp.65.2016.06.28.16.47.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 16:47:46 -0700 (PDT) From: Lazaros Koromilas To: dev@dpdk.org Cc: Olivier Matz Date: Wed, 29 Jun 2016 00:47:35 +0100 Message-Id: <1467157658-28935-1-git-send-email-l@nofutznetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467042637-22907-1-git-send-email-olivier.matz@6wind.com> References: <1467042637-22907-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v5 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: Tue, 28 Jun 2016 23:47:48 -0000 Updated version of the user-owned cache patchset. It applies on top of the latest v15 external mempool manager patches from David Hunt [1]. [1] http://dpdk.org/ml/archives/dev/2016-June/042004.html v5 changes: * Rework error path macros in tests. * Update documentation. * Style fixes. 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 and put functions mempool: use bit flags to set multi consumers and producers mempool: allow for user-owned mempool caches app/test/test_mempool.c | 83 +++++--- app/test/test_mempool_perf.c | 73 ++++++- doc/guides/prog_guide/env_abstraction_layer.rst | 4 +- doc/guides/prog_guide/mempool_lib.rst | 6 +- lib/librte_mempool/rte_mempool.c | 66 +++++- lib/librte_mempool/rte_mempool.h | 257 ++++++++++++++++++------ lib/librte_mempool/rte_mempool_version.map | 6 + 7 files changed, 385 insertions(+), 110 deletions(-) -- 1.9.1