1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright 2018 NXP 3 */ 4 5 #ifndef __RTE_DPAA2_MEMPOOL_H__ 6 #define __RTE_DPAA2_MEMPOOL_H__ 7 8 /** 9 * @file 10 * 11 * NXP specific mempool related functions. 12 * 13 */ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #include <rte_mempool.h> 20 21 /** 22 * Get BPID corresponding to the packet pool 23 * 24 * @param mp 25 * memory pool 26 * 27 * @return 28 * BPID of the buffer pool 29 */ 30 uint16_t 31 rte_dpaa2_mbuf_pool_bpid(struct rte_mempool *mp); 32 33 /** 34 * Get MBUF from the corresponding 'buf_addr' 35 * 36 * @param mp 37 * memory pool 38 * @param buf_addr 39 * The 'buf_addr' of the mbuf. This is the start buffer address 40 * of the packet buffer (mbuf). 41 * 42 * @return 43 * - MBUF pointer for success 44 * - NULL in case of error 45 */ 46 struct rte_mbuf * 47 rte_dpaa2_mbuf_from_buf_addr(struct rte_mempool *mp, void *buf_addr); 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 #endif /* __RTE_DPAA2_MEMPOOL_H__ */ 54