[dpdk-dev] [PATCH v2 5/5] mbuf: add user command line config mempools ops API
Jerin Jacob
jerin.jacob at caviumnetworks.com
Mon Jan 15 13:29:45 CET 2018
-----Original Message-----
> Date: Mon, 15 Jan 2018 11:41:14 +0530
> From: Hemant Agrawal <hemant.agrawal at nxp.com>
> To: dev at dpdk.org
> CC: jerin.jacob at caviumnetworks.com, olivier.matz at 6wind.com,
> santosh.shukla at caviumnetworks.com
> Subject: [PATCH v2 5/5] mbuf: add user command line config mempools ops API
> X-Mailer: git-send-email 2.7.4
>
> This patch add the user command line configured mempool ops name
> API to librte_mbuf and sends a deprecation notice to remove the
> similar API from eal.
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 7 +++++++
> lib/librte_mbuf/rte_mbuf.c | 8 +++++++-
> lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++
> lib/librte_mbuf/rte_mbuf_version.map | 1 +
> 4 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 13e8543..ec8018f 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here.
> Deprecation Notices
> -------------------
>
> +* eal: a mbuf specific API was part of eal APIs. This is now being
> + moved to librte_mbuf to be with other similar APIs.
> + The following API is target to be deprecated on 18.05.
> +
> + - ``rte_eal_mbuf_default_mempool_ops`` replaced by
> + ``rte_mbuf_user_mempool_ops''
> +
I think, deprecation notice need to be in a separate 'doc" patch.
> * eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02.
> The format of device command line parameters will change. The bus will need
> to be explicitly stated in the device declaration. The enum ``rte_devtype``
> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
> index 482676c..c587d3a 100644
> --- a/lib/librte_mbuf/rte_mbuf.c
> +++ b/lib/librte_mbuf/rte_mbuf.c
> @@ -168,12 +168,18 @@ rte_mbuf_platform_mempool_ops(void)
> return internal_config.plat_mbuf_pool_ops_name;
> }
>
> +const char *
> +rte_mbuf_user_mempool_ops(void)
> +{
> + return internal_config.user_mbuf_pool_ops_name;
> +}
> +
> /* Return mbuf pool ops name */
> static const char *
> rte_mbuf_best_mempool_ops(void)
> {
> /* User defined mempool ops takes the priority */
> - const char *best_ops = rte_eal_mbuf_default_mempool_ops();
I think, we may need to remove the stale rte_eal_mbuf_default_mempool_ops() once
it is replaced.
> + const char *best_ops = rte_mbuf_user_mempool_ops();
> if (best_ops)
> return best_ops;
>
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index f958e3c..7feacc0 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -1143,6 +1143,16 @@ const char*
> rte_mbuf_platform_mempool_ops(void);
>
> /**
> + * Get user command line configured pool ops name for mbuf
> + *
> + * @return
> + * returns user pool ops name.
> + */
> +
> +const char*
> +rte_mbuf_user_mempool_ops(void);
> +
> +/**
> * Get the data room size of mbufs stored in a pktmbuf_pool
> *
> * The data room size is the amount of data that can be stored in a
> diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
> index 9b53502..d4af497 100644
> --- a/lib/librte_mbuf/rte_mbuf_version.map
> +++ b/lib/librte_mbuf/rte_mbuf_version.map
> @@ -41,6 +41,7 @@ DPDK_18.02 {
>
> rte_mbuf_platform_mempool_ops;
> rte_mbuf_register_platform_mempool_ops;
> + rte_mbuf_user_mempool_ops;
> rte_pktmbuf_pool_create_specific;
>
> } DPDK_16.11;
> --
> 2.7.4
>
More information about the dev
mailing list