[dpdk-dev] [PATCH v7 0/8] Infrastructure to support octeontx HW mempool manager

Santosh Shukla santosh.shukla at caviumnetworks.com
Sun Oct 1 11:28:54 CEST 2017

Includes v6 minor review changes suggested by Olivier.
Patches are rebases on tip / upstream commit : 5dce9fcdb23

Include v5 review change, suggested by Olivier.
Patches rebased on tip, commit:06791a4bcedf

Includes v4 review change, suggested by Olivier.

- mempool deprecation changes, refer [1],
- patches are rebased against v17.11-rc0.

In order to support octeontx HW mempool manager, the common mempool layer must
meet below condition.
- Object start address should be block size (total elem size) aligned.
- Object must have the physically contiguous address within the pool.

And right now mempool doesn't support both.

Patchset adds infrastrucure to support both condition in a _generic_ way.
Proposed solution won't effect existing mempool drivers or its functionality.

Introducing capability flag. Now mempool drivers can advertise their
capabilities to common mempool layer(at the pool creation time).
Handlers are introduced in order to support capability flag.

* MEMPOOL_F_CAPA_PHYS_CONTIG - If flag is set then Detect whether the object
has the physically contiguous address with in a hugepage.

* MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS - If flag is set then make sure that object
addresses are block size aligned.

Two handles are introduced:
* rte_mempool_ops_get_capabilities - advertise mempool manager capability.
* rte_mempool_ops_register_memory_area - Notify memory area (start/end addr) to 
					 HW mempool manager.

Change History:
v6 --> v7:
- Added mask (flag check var) in [07/08] (Suggested by Olivier)
- Incorporated comment nits changes in [08/08] (Suggested by Olivier).

v5 --> v6:
- Renamed flag from MEMPOOL_F_BLK_ALIGNED_OBJECTS to
  MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS and updated API description (Suggested by
- Muxed _ALIGNED capability flag with _PHY_CONTIG per v5 thread [5].
- Renamed API from rte_mempool_ops_update_range to 
  rte_mempool_ops_register_memory_area (Suggested by Olivier)
- Upadted API description for FLAGS and API both (Suggested by Olivier).

Refer individual patch for detailed change history.

v4 --> v5:
- Replaced mp param with flags param in xmem_size/_usage() api. (Suggested by
- Renamed flags from MEMPOOL_F_POOL_BLK_SZ_ALIGNED to
  MEMPOOL_F_BLK_ALIGNED_OBJECTS (suggested by Olivier)
- added flag param in get_capabilities() handle (suggested by Olivier)

v3 --> v4:
* [01 - 02 - 03/07] mempool deprecation notice changes.
* [04 - 05 - 06 - 07/07] are v3 patches.

v2 --> v3:
(Note: v3 work is based on deprecation notice [1], It's for 17.11)
* Changed _version.map from 17.08 to 17.11.
* build fixes reported by stv_sys.
* Patchset rebased on upstream commit: da94a999.

v1 --> v2 :
* [01/06] Per deprecation notice [1], Changed rte_mempool 'flag'
  data type from int to unsigned int and removed flag param
  from _xmem_size/usage api.
* [02/06] Incorporated review feedback from v1 [2] (Suggested by Olivier)
* [03/06] Renamed flag to MEMPOOL_F_CAPA_PHYS_CONTIG
  and comment reworded. (Suggested by Olivier per v1 [3])
* [04/06] added new mempool arg in xmem_size/usage. (Suggested by Olivier)
* [05/06] patch description changed.
        - Removed elseif brakcet mix
        - removed sanity check for alignment
        - removed extra var delta
        - Removed __rte_unused from xmem_usage/size and added _BLK_SZ_ALIGN check.
        (Suggeted by Olivier per v1[4])
* [06/06] Added RTE_FUNC_PTR_OR_RET in rte_mempool_ops_update_ops.

Checkpatch status:


[1] deprecation notice v2: http://dpdk.org/dev/patchwork/patch/27079/
[2] v1: http://dpdk.org/dev/patchwork/patch/25603/
[3] v1: http://dpdk.org/dev/patchwork/patch/25604/
[4] v1: http://dpdk.org/dev/patchwork/patch/25605/
[5] v5: http://dpdk.org/dev/patchwork/patch/28418/

Santosh Shukla (8):
  mempool: remove unused flags argument
  mempool: change flags from int to unsigned int
  mempool: add flags arg in xmem size and usage
  doc: remove mempool notice
  mempool: get the mempool capability
  mempool: detect physical contiguous object in pool
  mempool: introduce block size align flag
  mempool: notify memory area to pool

 doc/guides/rel_notes/deprecation.rst       |   9 ---
 doc/guides/rel_notes/release_17_11.rst     |   7 ++
 drivers/net/xenvirt/rte_mempool_gntalloc.c |   7 +-
 lib/librte_mempool/rte_mempool.c           |  60 +++++++++++++--
 lib/librte_mempool/rte_mempool.h           | 116 ++++++++++++++++++++++-------
 lib/librte_mempool/rte_mempool_ops.c       |  29 ++++++++
 lib/librte_mempool/rte_mempool_version.map |   8 ++
 test/test/test_mempool.c                   |  25 ++++---
 test/test/test_mempool_perf.c              |   4 +-
 9 files changed, 207 insertions(+), 58 deletions(-)


More information about the dev mailing list