mbox series

[v5,0/7] Dynamic HW Mempool Detection Support

Message ID 1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com
Headers show
Series Dynamic HW Mempool Detection Support | expand

Message

Hemant Agrawal Jan. 20, 2018, 6:15 a.m. UTC
W.r.t the multiple discussions in the past about the ability to
dynamically detect the HW mempool support. [1],[2] & [3]

This patchset helps in removing the current static mempool selection
model and provides a flexible model to select the pktmbuf mempool
in more dynamic way.

1) This patchset updates the hw mempool on the basis of device probe()),
   thus avoiding the need to specify the hw mempool in config file and
   focing different binaries for diffirent config architectures.
2) Selection of mempool ops though --mbuf-pool-ops-name (cmd line arg)
   which can overridden the scheme(1)
3) A new best mempool ops selection logic.
4) A new wrapper for the pktmbuf_pool_create helper to take mempool ops
   name as an argument as well.

*Future Discussion points*

1. Platform OPS name is to be registered by the respentive HW. So it
is the responsibility of HW to take care of not registering it from
secondary process.

2. This logic can be further extended with addition for following
patch, which is still under discussion. The ethdev PMD capability exposed
through existing rte_eth_dev_pool_ops_supported() to select the update
the mempool ops with some "weight" based algorithm like:
http://dpdk.org/dev/patchwork/patch/32245/

[1]Multiple Pktmbuf mempool support
http://dpdk.org/ml/archives/dev/2017-September/076531.html
[2]Allow application set mempool handle
http://dpdk.org/ml/archives/dev/2017-June/067022.html
Other discussions
[3] http://dpdk.org/ml/archives/dev/2017-December/084775.html
------
Changes in v5:
1. Fix the doxygen API issues
2. remove unnecessary memset.

Changes in v4:
1. Taking care of Olivier's comments
2. Changing the mempool ops name memory to named memzone 

Changes in v3:
1. Moving the new mbuf APIs to rte_mbuf_pool_ops.h
2. Taking care of comments from Jerin and Olivier
3. Adding memory for platform mempools ops in librte_mbuf

Changes in v2:
1. Changed the active mempool to platform mempool
2. Moved all the relavant APIs to librte_mbuf
3. Added pktmbuf_create_pool_specific wrapper in this patch series.

Hemant Agrawal (6):
  eal: prefix mbuf pool ops name with user defined
  mbuf: maintain user and compile time mempool ops name
  mbuf: add pool ops name selection API helpers
  mbuf: pktmbuf pool create helper for specific mempool ops
  dpaa: register dpaa as platform HW mempool on runtime
  dpaa2: register dpaa2 as platform HW mempool on runtime

Pavan Nikhilesh (1):
  app/testpmd: set preferred mempool as default pktpool

 app/test-pmd/testpmd.c                     |  3 +
 config/defconfig_arm64-dpaa-linuxapp-gcc   |  1 -
 config/defconfig_arm64-dpaa2-linuxapp-gcc  |  1 -
 doc/api/doxy-api-index.md                  |  1 +
 drivers/bus/dpaa/dpaa_bus.c                |  2 +
 drivers/bus/dpaa/rte_dpaa_bus.h            |  2 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c   |  3 +
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h    |  2 +
 drivers/mempool/dpaa/dpaa_mempool.c        |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c   |  2 +-
 lib/librte_eal/bsdapp/eal/eal.c            |  4 +-
 lib/librte_eal/common/eal_common_options.c |  2 +-
 lib/librte_eal/common/eal_internal_cfg.h   |  3 +-
 lib/librte_eal/linuxapp/eal/eal.c          |  4 +-
 lib/librte_mbuf/Makefile                   |  4 +-
 lib/librte_mbuf/rte_mbuf.c                 | 24 ++++++--
 lib/librte_mbuf/rte_mbuf.h                 | 42 +++++++++++++
 lib/librte_mbuf/rte_mbuf_pool_ops.c        | 96 ++++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_pool_ops.h        | 91 ++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_version.map       | 11 ++++
 20 files changed, 282 insertions(+), 18 deletions(-)
 create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.c
 create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.h

-- 
2.7.4

Comments

santosh Jan. 22, 2018, 2:43 p.m. UTC | #1
On Monday 22 January 2018 07:21 PM, Hemant Agrawal wrote:
> This patch prefix the mbuf pool ops name with "user" to indicate

> that it is user defined.

>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> Acked-by: Olivier Matz <olivier.matz@6wind.com>

> ---


Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
santosh Jan. 22, 2018, 2:47 p.m. UTC | #2
On Monday 22 January 2018 07:21 PM, Hemant Agrawal wrote:
> This patch change the logic to maintain the value of

> user defined and compile time i.e. RTE_MBUF_DEFAULT_MEMPOOL_OPS.

>

> The pktmbuf_create_pool is updated to reflect the same.

>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> Acked-by: Olivier Matz <olivier.matz@6wind.com>

> ---


Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
santosh Jan. 22, 2018, 2:49 p.m. UTC | #3
On Monday 22 January 2018 07:21 PM, 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@nxp.com>

> Acked-by: Olivier Matz <olivier.matz@6wind.com>

> ---


Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
santosh Jan. 22, 2018, 2:51 p.m. UTC | #4
On Monday 22 January 2018 07:21 PM, Hemant Agrawal wrote:
> Introduce a new helper for pktmbuf pool, which will allow

> the application to optionally specify the mempool ops name

> as well.

>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> Acked-by: Olivier Matz <olivier.matz@6wind.com>

> ---


Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
santosh Jan. 22, 2018, 2:52 p.m. UTC | #5
On Monday 22 January 2018 07:21 PM, Hemant Agrawal wrote:
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

>

> Set the mempool preferred by the ethernet devices as default mbuf

> mempool before creating the pktpool.

>

> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>

> ---


Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>