[dpdk-dev] [PATCH v7 3/7] mbuf: add pool ops name selection API helpers
Andrew Rybchenko
arybchenko at solarflare.com
Mon Jan 29 09:44:00 CET 2018
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 <hemant.agrawal at nxp.com>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
> Acked-by: Santosh Shukla <santosh.shukla at caviumnetworks.com>
> ---
> 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
More information about the dev
mailing list