From 7b53c036e6bf56623b8273018ff1c8cc62847857 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Mon, 25 Jul 2016 13:22:22 -0300 Subject: Imported Upstream version 16.07-rc4 Change-Id: Ic57f6a3726f2dbd1682223648d91310f45705327 Signed-off-by: Ricardo Salveti --- lib/librte_mempool/rte_mempool.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/librte_mempool/rte_mempool.h') 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_" */ @@ -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. */ -- cgit 1.2.3-korg