printf("get private data\n");
if (rte_mempool_get_priv(mp) != (char *)mp +
- MEMPOOL_HEADER_SIZE(mp, mp->cache_size))
+ RTE_MEMPOOL_HEADER_SIZE(mp, mp->cache_size))
GOTO_ERR(ret, out);
#ifndef RTE_EXEC_ENV_FREEBSD /* rte_mem_virt2iova() not supported on bsd */
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
+* mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
+ be removed in DPDK 22.11. The replacement macro
+ ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
+
* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
A compatibility layer will be kept until DPDK 22.11, except for the flags
that are already deprecated (``PKT_RX_L4_CKSUM_BAD``, ``PKT_RX_IP_CKSUM_BAD``,
* mempool: The mempool flags ``MEMPOOL_F_*`` will be deprecated in the future.
Newly added flags with ``RTE_MEMPOOL_F_`` prefix should be used instead.
+* mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated.
+ The replacement macro ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
+
* net: Renamed ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure
to ``src_addr`` and ``dst_addr``, respectively.
goto exit_unlock;
}
- mempool_size = MEMPOOL_HEADER_SIZE(mp, cache_size);
+ mempool_size = RTE_MEMPOOL_HEADER_SIZE(mp, cache_size);
mempool_size += private_data_size;
mempool_size = RTE_ALIGN_CEIL(mempool_size, RTE_MEMPOOL_ALIGN);
/* init the mempool structure */
mp = mz->addr;
- memset(mp, 0, MEMPOOL_HEADER_SIZE(mp, cache_size));
+ memset(mp, 0, RTE_MEMPOOL_HEADER_SIZE(mp, cache_size));
ret = strlcpy(mp->name, name, sizeof(mp->name));
if (ret < 0 || ret >= (int)sizeof(mp->name)) {
rte_errno = ENAMETOOLONG;
* The local_cache points to just past the elt_pa[] array.
*/
mp->local_cache = (struct rte_mempool_cache *)
- RTE_PTR_ADD(mp, MEMPOOL_HEADER_SIZE(mp, 0));
+ RTE_PTR_ADD(mp, RTE_MEMPOOL_HEADER_SIZE(mp, 0));
/* Init all default caches. */
if (cache_size != 0) {
#endif
/**
- * Calculate the size of the mempool header.
+ * @internal Calculate the size of the mempool header.
*
* @param mp
* Pointer to the memory pool.
* @param cs
* Size of the per-lcore cache.
*/
-#define MEMPOOL_HEADER_SIZE(mp, cs) \
+#define RTE_MEMPOOL_HEADER_SIZE(mp, cs) \
(sizeof(*(mp)) + (((cs) == 0) ? 0 : \
(sizeof(struct rte_mempool_cache) * RTE_MAX_LCORE)))
+/** Deprecated. Use RTE_MEMPOOL_HEADER_SIZE() for internal purposes only. */
+#define MEMPOOL_HEADER_SIZE(mp, cs) \
+ RTE_DEPRECATED(MEMPOOL_HEADER_SIZE) RTE_MEMPOOL_HEADER_SIZE(mp, cs)
+
/* return the header of a mempool object (internal) */
static inline struct rte_mempool_objhdr *
rte_mempool_get_header(void *obj)
static inline void *rte_mempool_get_priv(struct rte_mempool *mp)
{
return (char *)mp +
- MEMPOOL_HEADER_SIZE(mp, mp->cache_size);
+ RTE_MEMPOOL_HEADER_SIZE(mp, mp->cache_size);
}
/**