1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
5 #ifndef __OTX2_MEMPOOL_H__
6 #define __OTX2_MEMPOOL_H__
8 #include <rte_bitmap.h>
9 #include <rte_bus_pci.h>
10 #include <rte_devargs.h>
11 #include <rte_mempool.h>
13 #include "otx2_common.h"
14 #include "otx2_mbox.h"
17 NPA_LF_ERR_PARAM = -512,
18 NPA_LF_ERR_ALLOC = -513,
19 NPA_LF_ERR_INVALID_BLOCK_SZ = -514,
20 NPA_LF_ERR_AURA_ID_ALLOC = -515,
21 NPA_LF_ERR_AURA_POOL_INIT = -516,
22 NPA_LF_ERR_AURA_POOL_FINI = -517,
23 NPA_LF_ERR_BASE_INVALID = -518,
27 struct otx2_npa_qint {
28 struct otx2_npa_lf *lf;
41 struct otx2_mbox *mbox;
42 uint32_t stack_pg_ptrs;
43 uint32_t stack_pg_bytes;
44 struct rte_bitmap *npa_bmp;
45 struct rte_pci_device *pci_dev;
46 struct rte_intr_handle *intr_handle;
49 #define AURA_ID_MASK (BIT_ULL(16) - 1)
52 int otx2_npa_lf_init(struct rte_pci_device *pci_dev, void *otx2_dev);
53 int otx2_npa_lf_fini(void);
55 #endif /* __OTX2_MEMPOOL_H__ */