From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id E144C8E8B for ; Tue, 14 Jun 2016 14:55:31 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id k204so121775164wmk.0 for ; Tue, 14 Jun 2016 05:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=HU7xG9nPvWHVBBKxQZvdHmVwo3kehKBgSGibVYs/OMg=; b=m/5LD8szAyDlnCCXGvnTnlbIMG0yMO86pPmpCaqxS4FE/JZqVfAQsYEnmFxKZ3iQyo 1wl7UespzB4pfy35cmXZXkSA+V2Aeab9K7VU9jamLVbVLAATth7a1eQpUip8fhj7xlTN mI7RNYyTMg+OcwV4RtKKzAGy4sGcIpubHdTsMHCaKZCRUbzOfBWGZnqKHebr5nzFaa8l 9OGKikzWAr4mr03iKq6ZzUjIg8bBxFoZ27obLuc9gMkpMigRPg6MdBysKdlxK5y5XH0h k/5bOvAyu3JiwgdapxFDesTic7kwO5+GO/xTkjnVnBgI/ru8GHgQEJ83WvNQe75BFURD y0rA== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=HU7xG9nPvWHVBBKxQZvdHmVwo3kehKBgSGibVYs/OMg=; b=CEH/jvN/NNOUxRVSg4ZmhSr+3lCo3Z3PXshElY/xq/baG1Cnc5dyPhizf1dR67we14 BXoK7OgX0UcyURvaXFxynsASbiecbvl4mZ/tMp3n3WHD3mMKM5RG/NO7Dm8QoEN9prJN +vR54ongj/FQqnp3banMUGHCmbkGjKSHOMYT3S/X7j8FaRoNqUl8ushIsZAeCxVkZhB5 01wt534GxgDYvjVmS9NxJZMbdrWqdBjkhT7Mg5w37Kpq2rky84pGFr+N/NOn77aPsWkU mADDg4Q/5BzXlXbWKSdNhJNb2jSN7ePn64PiszR3x/5iNZ5AGH7WPg4TyXibtPl29cq2 U8XA== X-Gm-Message-State: ALyK8tIPGipLYlBTE46WdfhmSUgV/9K6/PDZyvXzEda39jMXigFHCRUSymER4AZkiWOhHZUZ X-Received: by 10.28.91.145 with SMTP id p139mr6490080wmb.50.1465908931593; Tue, 14 Jun 2016 05:55:31 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id a84sm4071096wma.0.2016.06.14.05.55.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 05:55:30 -0700 (PDT) From: Thomas Monjalon To: David Hunt Cc: dev@dpdk.org, olivier.matz@6wind.com, viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com Date: Tue, 14 Jun 2016 14:55:29 +0200 Message-ID: <1713942.6DB6T3RQsY@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1465897575-37638-2-git-send-email-david.hunt@intel.com> References: <1465571806-22008-1-git-send-email-david.hunt@intel.com> <1465897575-37638-1-git-send-email-david.hunt@intel.com> <1465897575-37638-2-git-send-email-david.hunt@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v10 1/3] mempool: support external mempool operations 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, 14 Jun 2016 12:55:32 -0000 Hi David, 2016-06-14 10:46, David Hunt: > Until now, the objects stored in a mempool were internally stored in a > ring. This patch introduces the possibility to register external handlers > replacing the ring. > > The default behavior remains unchanged, but calling the new function > rte_mempool_set_handler() right after rte_mempool_create_empty() allows > the user to change the handler that will be used when populating > the mempool. > > This patch also adds a set of default ops (function callbacks) based > on rte_ring. > > Signed-off-by: Olivier Matz > Signed-off-by: David Hunt Glad to see we are close to have this feature integrated. I've just looked into few details before pushing. One of them are the comments. In mempool they were all ended by a dot. Please check the new comments. The doc/guides/rel_notes/deprecation.rst must be updated to remove the deprecation notice in this patch. Isn't there some explanations to add in doc/guides/prog_guide/mempool_lib.rst? Isn't there a better name than "default" for the default implementation? I don't think the filename rte_mempool_default.c is meaningful. > +/** > + * Register mempool operations > + * > + * @param h > + * Pointer to and ops structure to register The parameter name and its description are not correct. > + * @return > + * - >=0: Success; return the index of the ops struct in the table. > + * - -EINVAL - some missing callbacks while registering ops struct > + * - -ENOSPC - the maximum number of ops structs has been reached > + */ > +int rte_mempool_ops_register(const struct rte_mempool_ops *ops); You can check the doc with doxygen: make doc-api-html > --- a/lib/librte_mempool/rte_mempool_version.map > +++ b/lib/librte_mempool/rte_mempool_version.map > @@ -19,6 +19,8 @@ DPDK_2.0 { > DPDK_16.7 { > global: > > + rte_mempool_ops_table; > + Why this empty line? > rte_mempool_check_cookies; > rte_mempool_obj_iter; > rte_mempool_mem_iter; > @@ -29,6 +31,8 @@ DPDK_16.7 { > rte_mempool_populate_default; > rte_mempool_populate_anon; > rte_mempool_free; > + rte_mempool_set_ops_byname; > + rte_mempool_ops_register; Please keep it in alphabetical order. It seems the order was not respected before in mempool.