From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v7 3/7] mbuf: add pool ops name selection API helpers Date: Mon, 29 Jan 2018 11:44:00 +0300 Message-ID: References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-4-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Cc: , , To: Hemant Agrawal , , Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5350E1B357 for ; Mon, 29 Jan 2018 09:44:15 +0100 (CET) In-Reply-To: <1517213449-678-4-git-send-email-hemant.agrawal@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 01/29/2018 11:10 AM, Hemant Agrawal wrote: > This patch add support for various mempool ops config helper APIs. > > 1.User defined mempool ops > 2.Platform detected HW mempool ops (active). > 3.Best selection of mempool ops by looking into user defined, > platform registered and compile time configured. > > Signed-off-by: Hemant Agrawal > Acked-by: Olivier Matz > Acked-by: Santosh Shukla > --- > doc/api/doxy-api-index.md | 1 + > lib/librte_mbuf/Makefile | 4 +- > lib/librte_mbuf/rte_mbuf.c | 5 +- > lib/librte_mbuf/rte_mbuf_pool_ops.c | 96 ++++++++++++++++++++++++++++++++++++ > lib/librte_mbuf/rte_mbuf_pool_ops.h | 96 ++++++++++++++++++++++++++++++++++++ > lib/librte_mbuf/rte_mbuf_version.map | 11 +++++ > 6 files changed, 208 insertions(+), 5 deletions(-) > create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.c > create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.h <...> > diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.h b/lib/librte_mbuf/rte_mbuf_pool_ops.h > new file mode 100644 > index 0000000..e8ee20f > --- /dev/null > +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h <...> > + > +/** > + * Set the platform supported pktmbuf HW mempool ops name > + * > + * This function allow the HW to register the actively supported HW mempool > + * ops_name. Only one HW mempool ops can be registered at any point of time. > + * > + * @param ops_name > + * @return > + * - On success, zero. > + * - On failure, a negative value. > + */ > +int > +rte_mbuf_set_platform_mempool_ops(const char *ops_name); Just one minor note: As far as I can see it is not strictly followed in DPDK headers, but coding standard [1] says that "Short function prototypes should be contained on a single line." and all examples in coding style follow it. There is a known practical reason behind it: grep -r ^function_nameĀ  will find single place where the function is implemented. <...> [1] http://dpdk.org/doc/guides/contributing/coding_style.html#prototypes