Santosh Shukla
2017-06-21 17:32:44 UTC
In order to support octeontx HW mempool manager, the common mempool layer must
meet below condition.
- buffer start address should be block size aligned.
- buffers 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.
Summary:
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.
Flags:
* MEMPOOL_F_POOL_CONTIG - If flag is set then Detect whether the buffer
has the physically contiguous address with in a hugepage.
* MEMPOOL_F_POOL_BLK_SZ_ALIGNED - If flag is set then make sure that buffer
addresses are block size aligned.
API:
Two handles are introduced:
* rte_mempool_ops_get_hw_cap - advertise HW mempool manager capability.
* rte_mempool_ops_update_range - Update pa/va start and end address range to
HW mempool manager.
Testing:
* Tested for x86_64 for rte_ring and stack.
* Tested for Octeontx HW mempool block.
Checkpatch status:
* Noticed false positive checkpatch warning:
WARNING: line over 80 characters
#30: FILE: lib/librte_mempool/rte_mempool.c:374:
+ RTE_LOG(ERR, MEMPOOL, "nb_mbufs not fitting in one hugepage,..exit\n");
WARNING: line over 80 characters
#46: FILE: lib/librte_mempool/rte_mempool.h:269:
+#define MEMPOOL_F_POOL_CONTIG 0x0040 /**< Detect physcially contiguous objs */
total: 0 errors, 2 warnings, 21 lines checked
Thanks.
Santosh Shukla (4):
mempool: get the external mempool capability
mempool: detect physical contiguous object in pool
mempool: introduce block size align flag
mempool: update range info to pool
lib/librte_mempool/rte_mempool.c | 34 ++++++++++++++++++++--
lib/librte_mempool/rte_mempool.h | 46 ++++++++++++++++++++++++++++++
lib/librte_mempool/rte_mempool_ops.c | 27 ++++++++++++++++++
lib/librte_mempool/rte_mempool_version.map | 8 ++++++
4 files changed, 112 insertions(+), 3 deletions(-)
meet below condition.
- buffer start address should be block size aligned.
- buffers 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.
Summary:
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.
Flags:
* MEMPOOL_F_POOL_CONTIG - If flag is set then Detect whether the buffer
has the physically contiguous address with in a hugepage.
* MEMPOOL_F_POOL_BLK_SZ_ALIGNED - If flag is set then make sure that buffer
addresses are block size aligned.
API:
Two handles are introduced:
* rte_mempool_ops_get_hw_cap - advertise HW mempool manager capability.
* rte_mempool_ops_update_range - Update pa/va start and end address range to
HW mempool manager.
Testing:
* Tested for x86_64 for rte_ring and stack.
* Tested for Octeontx HW mempool block.
Checkpatch status:
* Noticed false positive checkpatch warning:
WARNING: line over 80 characters
#30: FILE: lib/librte_mempool/rte_mempool.c:374:
+ RTE_LOG(ERR, MEMPOOL, "nb_mbufs not fitting in one hugepage,..exit\n");
WARNING: line over 80 characters
#46: FILE: lib/librte_mempool/rte_mempool.h:269:
+#define MEMPOOL_F_POOL_CONTIG 0x0040 /**< Detect physcially contiguous objs */
total: 0 errors, 2 warnings, 21 lines checked
Thanks.
Santosh Shukla (4):
mempool: get the external mempool capability
mempool: detect physical contiguous object in pool
mempool: introduce block size align flag
mempool: update range info to pool
lib/librte_mempool/rte_mempool.c | 34 ++++++++++++++++++++--
lib/librte_mempool/rte_mempool.h | 46 ++++++++++++++++++++++++++++++
lib/librte_mempool/rte_mempool_ops.c | 27 ++++++++++++++++++
lib/librte_mempool/rte_mempool_version.map | 8 ++++++
4 files changed, 112 insertions(+), 3 deletions(-)
--
2.13.0
2.13.0