From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 98A2B5F14 for ; Mon, 26 Mar 2018 18:10:10 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 21A9FBC006E; Mon, 26 Mar 2018 16:10:09 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 26 Mar 2018 09:10:06 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Mon, 26 Mar 2018 09:10:05 -0700 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w2QGA4p5003630; Mon, 26 Mar 2018 17:10:04 +0100 Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w2QGA4Z0024909; Mon, 26 Mar 2018 17:10:04 +0100 From: Andrew Rybchenko To: CC: Olivier MATZ , Thomas Monjalon , Anatoly Burakov , Santosh Shukla , Jerin Jacob , Hemant Agrawal , Shreyansh Jain Date: Mon, 26 Mar 2018 17:09:40 +0100 Message-ID: <1522080591-24705-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1516713372-10572-1-git-send-email-arybchenko@solarflare.com> References: <1516713372-10572-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-MDID: 1522080609-9pofIu6DFqg0 Subject: [dpdk-dev] [PATCH v3 00/11] mempool: prepare to add bucket driver 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: Mon, 26 Mar 2018 16:10:11 -0000 The patch series should be applied on top of [7]. The initial patch series [1] is split into two to simplify processing. The second series relies on this one and will add bucket mempool driver and related ops. The patch series has generic enhancements suggested by Olivier. Basically it adds driver callbacks to calculate required memory size and to populate objects using provided memory area. It allows to remove so-called capability flags used before to tell generic code how to allocate and slice allocated memory into mempool objects. Clean up which removes get_capabilities and register_memory_area is not strictly required, but I think right thing to do. Existing mempool drivers are updated. rte_mempool_populate_iova_tab() is also deprecated in v2 as agreed in [2]. Unfortunately it requires addition of -Wno-deprecated-declarations flag to librte_mempool since the function is used by deprecated earlier rte_mempool_populate_phys_tab(). If the later may be removed in the release, we can avoid addition of the flag to allow usage of deprecated functions. One open question remains from previous review [3]. The patch series interfere with memory hotplug for DPDK [4] ([5] to be precise). So, rebase may be required. A new patch is added to the series to rename MEMPOOL_F_NO_PHYS_CONTIG as MEMPOOL_F_NO_IOVA_CONTIG as agreed in [6]. MEMPOOL_F_CAPA_PHYS_CONTIG is not renamed since it removed in this patchset. It breaks ABI since changes rte_mempool_ops. Also it removes rte_mempool_ops_register_memory_area() and rte_mempool_ops_get_capabilities() since corresponding callbacks are removed. Internal global functions are not listed in map file since it is not a part of external API. [1] https://dpdk.org/ml/archives/dev/2018-January/088698.html [2] https://dpdk.org/ml/archives/dev/2018-March/093186.html [3] https://dpdk.org/ml/archives/dev/2018-March/093329.html [4] https://dpdk.org/ml/archives/dev/2018-March/092070.html [5] https://dpdk.org/ml/archives/dev/2018-March/092088.html [6] https://dpdk.org/ml/archives/dev/2018-March/093345.html [7] https://dpdk.org/ml/archives/dev/2018-March/093196.html v2 -> v3: - fix build error in mempool/dpaa: prepare to remove register memory area op v1 -> v2: - deprecate rte_mempool_populate_iova_tab() - add patch to fix memory leak if no objects are populated - add patch to rename MEMPOOL_F_NO_PHYS_CONTIG - minor fixes (typos, blank line at the end of file) - highlight meaning of min_chunk_size (when it is virtual or physical contiguous) - make sure that mempool is initialized in rte_mempool_populate_anon() - move patch to ensure that mempool is initialized earlier in the series RFCv2 -> v1: - split the series in two - squash octeontx patches which implement calc_mem_size and populate callbacks into the patch which removes get_capabilities since it is the easiest way to untangle the tangle of tightly related library functions and flags advertised by the driver - consistently name default callbacks - move default callbacks to dedicated file - see detailed description in patches RFCv1 -> RFCv2: - add driver ops to calculate required memory size and populate mempool objects, remove extra flags which were required before to control it - transition of octeontx and dpaa drivers to the new callbacks - change info API to get information from driver required to API user to know contiguous block size - remove get_capabilities (not required any more and may be substituted with more in info get API) - remove register_memory_area since it is substituted with populate callback which can do more - use SPDX tags - avoid all objects affinity to single lcore - fix bucket get_count - deprecate XMEM API - avoid introduction of a new function to flush cache - fix NO_CACHE_ALIGN case in bucket mempool Andrew Rybchenko (9): mempool: fix memhdr leak when no objects are populated mempool: rename flag to control IOVA-contiguous objects mempool: add op to calculate memory size to be allocated mempool: add op to populate objects using provided memory mempool: remove callback to get capabilities mempool: deprecate xmem functions mempool/octeontx: prepare to remove register memory area op mempool/dpaa: prepare to remove register memory area op mempool: remove callback to register memory area Artem V. Andreev (2): mempool: ensure the mempool is initialized before populating mempool: support flushing the default cache of the mempool doc/guides/rel_notes/deprecation.rst | 12 +- doc/guides/rel_notes/release_18_05.rst | 33 ++- drivers/mempool/dpaa/dpaa_mempool.c | 13 +- drivers/mempool/octeontx/rte_mempool_octeontx.c | 64 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 2 +- lib/librte_mempool/Makefile | 6 +- lib/librte_mempool/meson.build | 17 +- lib/librte_mempool/rte_mempool.c | 179 ++++++++------- lib/librte_mempool/rte_mempool.h | 280 +++++++++++++++++------- lib/librte_mempool/rte_mempool_ops.c | 37 ++-- lib/librte_mempool/rte_mempool_ops_default.c | 51 +++++ lib/librte_mempool/rte_mempool_version.map | 10 +- test/test/test_mempool.c | 31 --- 13 files changed, 485 insertions(+), 250 deletions(-) create mode 100644 lib/librte_mempool/rte_mempool_ops_default.c -- 2.7.4