mbox series

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

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

Message

Hemant Agrawal Jan. 18, 2018, 1:26 p.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.

*Discussion points*

1. The command line parsing is done in EAL. So it is better to keep
the user defined mempool in internal_config only. APIs are provided
to access them from EAL.

2. 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.

3. 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 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
  eal: add API to set user default mbuf mempool ops
  mbuf: add pool ops name selection API helpers
  mbuf: pktmbuf pool create helper for specific mempool ops
  dpaa2: register dpaa2 as platform HW mempool on runtime
  dpaa: register dpaa 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 -
 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            | 10 +++-
 lib/librte_eal/common/eal_common_options.c |  2 +-
 lib/librte_eal/common/eal_internal_cfg.h   |  3 +-
 lib/librte_eal/common/include/rte_eal.h    |  9 ++++
 lib/librte_eal/linuxapp/eal/eal.c          | 10 +++-
 lib/librte_eal/rte_eal_version.map         |  1 +
 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        | 68 +++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_pool_ops.h        | 87 ++++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_version.map       | 11 ++++
 21 files changed, 271 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