net/bnxt: add resource manager
[dpdk.git] / drivers / net / bnxt / tf_core / tf_tbl.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _TF_TBL_H_
7 #define _TF_TBL_H_
8
9 #include <stdint.h>
10
11 enum tf_pg_tbl_lvl {
12         PT_LVL_0,
13         PT_LVL_1,
14         PT_LVL_2,
15         PT_LVL_MAX
16 };
17
18 /** Invalid table scope id */
19 #define TF_TBL_SCOPE_INVALID 0xffffffff
20
21 /**
22  * Table Scope Control Block
23  *
24  * Holds private data for a table scope. Only one instance of a table
25  * scope with Internal EM is supported.
26  */
27 struct tf_tbl_scope_cb {
28         uint32_t tbl_scope_id;
29         int index;
30         uint32_t              *ext_pool_mem[TF_DIR_MAX][TF_EXT_POOL_CNT_MAX];
31 };
32
33 /**
34  * Initialize table pool structure to indicate
35  * no table scope has been associated with the
36  * external pool of indexes.
37  *
38  * [in] session
39  */
40 void
41 tf_init_tbl_pool(struct tf_session *session);
42
43 #endif /* _TF_TBL_H_ */