[dpdk-dev] [RFC PATCH 0/6] mempool: add bucket mempool driver

Andrew Rybchenko arybchenko at solarflare.com
Fri Nov 24 17:06:25 CET 2017


The patch series adds bucket mempool driver which allows to allocate
(both physically and virtually) contiguous blocks of objects and adds
mempool API to do it. It is still capable to provide separate objects,
but it is definitely more heavy-weight than ring/stack drivers.

The target usecase is dequeue in blocks and enqueue separate objects
back (which are collected in buckets to be dequeued). So, the memory
pool with bucket driver is created by an application and provided to
networking PMD receive queue. The choice of bucket driver is done using
rte_eth_dev_pool_ops_supported(). A PMD that relies upon contiguous
block allocation should report the bucket driver as the only supported
and preferred one.

The number of objects in the contiguous block is a function of bucket
memory size (.config option) and total element size.

As I understand it breaks ABI so it requires 3 acks in accordance with
policy, deprecation notice and mempool shared library version bump.
If there is a way to avoid ABI breakage, please, let us know.

In any case we would like to start from RFC discussion. Comments and
ideas are welcome.

The target DPDK release is 18.05.

Artem V. Andreev (6):
  mempool: implement abstract mempool info API
  mempool: implement clustered object allocation
  mempool/bucket: implement bucket mempool manager
  mempool: add a function to flush default cache
  mempool: support block dequeue operation
  mempool/bucket: implement block dequeue operation

 MAINTAINERS                                        |   9 +
 config/common_base                                 |   2 +
 drivers/mempool/Makefile                           |   1 +
 drivers/mempool/bucket/Makefile                    |  49 ++
 drivers/mempool/bucket/rte_mempool_bucket.c        | 559 +++++++++++++++++++++
 .../mempool/bucket/rte_mempool_bucket_version.map  |   4 +
 lib/librte_mempool/rte_mempool.c                   |  41 +-
 lib/librte_mempool/rte_mempool.h                   | 179 ++++++-
 lib/librte_mempool/rte_mempool_ops.c               |  16 +
 mk/rte.app.mk                                      |   1 +
 test/test/test_mempool.c                           |   2 +-
 11 files changed, 857 insertions(+), 6 deletions(-)
 create mode 100644 drivers/mempool/bucket/Makefile
 create mode 100644 drivers/mempool/bucket/rte_mempool_bucket.c
 create mode 100644 drivers/mempool/bucket/rte_mempool_bucket_version.map

-- 
2.7.4



More information about the dev mailing list