aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_mempool
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-25 13:22:22 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-25 13:23:50 -0300
commit7b53c036e6bf56623b8273018ff1c8cc62847857 (patch)
tree4af0da8c150bbebd7d1d252d6ac801a7efef0d23 /lib/librte_mempool
parent5d4e5dcd8a186778b3d78e27c81550d07a288fd2 (diff)
Imported Upstream version 16.07-rc4
Change-Id: Ic57f6a3726f2dbd1682223648d91310f45705327 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'lib/librte_mempool')
-rw-r--r--lib/librte_mempool/rte_mempool.h11
-rw-r--r--lib/librte_mempool/rte_mempool_ops.c1
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 4a8fbb1e..059ad9e5 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -123,7 +123,9 @@ struct rte_mempool_objsz {
/**< Total size of an object (header + elt + trailer). */
};
-#define RTE_MEMPOOL_NAMESIZE 32 /**< Maximum length of a memory pool. */
+/**< Maximum length of a memory pool's name. */
+#define RTE_MEMPOOL_NAMESIZE (RTE_RING_NAMESIZE - \
+ sizeof(RTE_MEMPOOL_MZ_PREFIX) + 1)
#define RTE_MEMPOOL_MZ_PREFIX "MP_"
/* "MP_<name>" */
@@ -208,7 +210,12 @@ struct rte_mempool_memhdr {
* The RTE mempool structure.
*/
struct rte_mempool {
- char name[RTE_MEMPOOL_NAMESIZE]; /**< Name of mempool. */
+ /*
+ * Note: this field kept the RTE_MEMZONE_NAMESIZE size due to ABI
+ * compatibility requirements, it could be changed to
+ * RTE_MEMPOOL_NAMESIZE next time the ABI changes
+ */
+ char name[RTE_MEMZONE_NAMESIZE]; /**< Name of mempool. */
union {
void *pool_data; /**< Ring or pool to store objects. */
uint64_t pool_id; /**< External mempool identifier. */
diff --git a/lib/librte_mempool/rte_mempool_ops.c b/lib/librte_mempool/rte_mempool_ops.c
index fd0b64cf..5f24de25 100644
--- a/lib/librte_mempool/rte_mempool_ops.c
+++ b/lib/librte_mempool/rte_mempool_ops.c
@@ -81,6 +81,7 @@ rte_mempool_register_ops(const struct rte_mempool_ops *h)
ops = &rte_mempool_ops_table.ops[ops_index];
snprintf(ops->name, sizeof(ops->name), "%s", h->name);
ops->alloc = h->alloc;
+ ops->free = h->free;
ops->enqueue = h->enqueue;
ops->dequeue = h->dequeue;
ops->get_count = h->get_count;