From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 6A6E2400066; Mon, 29 Jan 2018 08:44:13 +0000 (UTC) Received: from [192.168.239.128] (188.242.181.57) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 29 Jan 2018 08:44:07 +0000 To: Hemant Agrawal , , CC: , , 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> From: Andrew Rybchenko Message-ID: Date: Mon, 29 Jan 2018 11:44:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1517213449-678-4-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [188.242.181.57] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23626.003 X-TM-AS-Result: No--4.007500-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1517215454-q+RojJ+3lZXe Subject: Re: [dpdk-dev] [PATCH v7 3/7] mbuf: add pool ops name selection API helpers 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, 29 Jan 2018 08:44:15 -0000 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