test/trace: add a test with traces enabled
[dpdk.git] / drivers / mempool / dpaa2 / rte_dpaa2_mempool.h
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 /**
50  * Initialize the rte_dpaa2_bpid_info
51  * In generial, it is called in the secondary process and
52  * mp has been created in the primary process.
53  *
54  * @param mp
55  *   memory pool
56  *
57  * @return
58  *  - 0 on success.
59  *  - (<0) on failure.
60  */
61 __rte_internal
62 int rte_dpaa2_bpid_info_init(struct rte_mempool *mp);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* __RTE_DPAA2_MEMPOOL_H__ */