From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 5C63B1B021 for ; Mon, 19 Mar 2018 18:03:25 +0100 (CET) Received: from lfbn-lil-1-702-109.w81-254.abo.wanadoo.fr ([81.254.39.109] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1exyCQ-00073Y-R0; Mon, 19 Mar 2018 18:03:56 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 19 Mar 2018 18:03:22 +0100 Date: Mon, 19 Mar 2018 18:03:22 +0100 From: Olivier Matz To: Andrew Rybchenko Cc: dev@dpdk.org, Santosh Shukla , Jerin Jacob , Hemant Agrawal , Shreyansh Jain Message-ID: <20180319170322.webhsihrpdcfns4y@platinum> References: <1516713372-10572-1-git-send-email-arybchenko@solarflare.com> <1520696382-16400-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520696382-16400-1-git-send-email-arybchenko@solarflare.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v1 0/9] 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, 19 Mar 2018 17:03:25 -0000 Hi Andrew, Thank you for this nice rework. Globally, the patchset looks good to me. I'm sending some comments as reply to specific patches. On Sat, Mar 10, 2018 at 03:39:33PM +0000, Andrew Rybchenko wrote: > 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. > > I've kept rte_mempool_populate_iova_tab() intact since it seems to > be not directly related XMEM API functions. The function rte_mempool_populate_iova_tab() (actually, it was rte_mempool_populate_phys_tab()) was introduced to support XMEM API. In my opinion, it can also be deprecated. > 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] http://dpdk.org/ml/archives/dev/2018-January/088698.html > > 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 > > 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 > > Andrew Rybchenko (7): > 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 | 32 ++- > drivers/mempool/dpaa/dpaa_mempool.c | 13 +- > drivers/mempool/octeontx/rte_mempool_octeontx.c | 64 ++++-- > lib/librte_mempool/Makefile | 3 +- > lib/librte_mempool/meson.build | 5 +- > lib/librte_mempool/rte_mempool.c | 159 +++++++-------- > lib/librte_mempool/rte_mempool.h | 260 +++++++++++++++++------- > lib/librte_mempool/rte_mempool_ops.c | 37 ++-- > lib/librte_mempool/rte_mempool_ops_default.c | 51 +++++ > lib/librte_mempool/rte_mempool_version.map | 11 +- > test/test/test_mempool.c | 31 --- > 12 files changed, 437 insertions(+), 241 deletions(-) > create mode 100644 lib/librte_mempool/rte_mempool_ops_default.c > > -- > 2.7.4 >