* Return a pointer to the mempool owning this object. * * @param obj * An object that is owned by a pool. If this is not the case, * the behavior is undefined. * @return * A pointer to the mempool structure. */
| 380 | * A pointer to the mempool structure. |
| 381 | */ |
| 382 | static inline struct rte_mempool *rte_mempool_from_obj(void *obj) |
| 383 | { |
| 384 | struct rte_mempool_objhdr *hdr = rte_mempool_get_header(obj); |
| 385 | return hdr->mp; |
| 386 | } |
| 387 | |
| 388 | /* return the trailer of a mempool object (internal) */ |
| 389 | static inline struct rte_mempool_objtlr *rte_mempool_get_trailer(void *obj) |