From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v11 1/3] mempool: support external mempool operations Date: Tue, 14 Jun 2016 18:08:39 +0200 Message-ID: <1731609.TaFs5CoLoa@xps13> References: <1465897575-37638-1-git-send-email-david.hunt@intel.com> <1465919341-3209-1-git-send-email-david.hunt@intel.com> <1465919341-3209-2-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, olivier.matz@6wind.com, viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com To: David Hunt Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 07B199A98 for ; Tue, 14 Jun 2016 18:08:42 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id n184so128681191wmn.1 for ; Tue, 14 Jun 2016 09:08:41 -0700 (PDT) In-Reply-To: <1465919341-3209-2-git-send-email-david.hunt@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-06-14 16:48, David Hunt: > +Several external mempool managers may be used in the same application. A new > +mempool can be created by using the ``rte_mempool_create_empty()`` function, > +then using ``rte_mempool_set_ops_byname()`` to point the mempool to the > +relevant mempool manager callbacki (ops) structure. vim typo: callbacki > +/** > + * Register mempool operations. > + * > + * @param h > + * Pointer to and ops structure to register. Same error as in v10. > + * @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);