51bb9ba3aba0fd573843441517a476d861766ab4
[dpdk.git] / drivers / net / bnxt / tf_core / tf_rm_new.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #include <rte_common.h>
7
8 #include "tf_rm_new.h"
9
10 /**
11  * Resource query single entry. Used when accessing HCAPI RM on the
12  * firmware.
13  */
14 struct tf_rm_query_entry {
15         /** Minimum guaranteed number of elements */
16         uint16_t min;
17         /** Maximum non-guaranteed number of elements */
18         uint16_t max;
19 };
20
21 /**
22  * Generic RM Element data type that an RM DB is build upon.
23  */
24 struct tf_rm_element {
25         /**
26          * RM Element configuration type. If Private then the
27          * hcapi_type can be ignored. If Null then the element is not
28          * valid for the device.
29          */
30         enum tf_rm_elem_cfg_type type;
31
32         /**
33          * HCAPI RM Type for the element.
34          */
35         uint16_t hcapi_type;
36
37         /**
38          * HCAPI RM allocated range information for the element.
39          */
40         struct tf_rm_alloc_info alloc;
41
42         /**
43          * Bit allocator pool for the element. Pool size is controlled
44          * by the struct tf_session_resources at time of session creation.
45          * Null indicates that the element is not used for the device.
46          */
47         struct bitalloc *pool;
48 };
49
50 /**
51  * TF RM DB definition
52  */
53 struct tf_rm_db {
54         /**
55          * The DB consists of an array of elements
56          */
57         struct tf_rm_element *db;
58 };
59
60 int
61 tf_rm_create_db(struct tf *tfp __rte_unused,
62                 struct tf_rm_create_db_parms *parms __rte_unused)
63 {
64         return 0;
65 }
66
67 int
68 tf_rm_free_db(struct tf *tfp __rte_unused,
69               struct tf_rm_free_db_parms *parms __rte_unused)
70 {
71         return 0;
72 }
73
74 int
75 tf_rm_allocate(struct tf_rm_allocate_parms *parms __rte_unused)
76 {
77         return 0;
78 }
79
80 int
81 tf_rm_free(struct tf_rm_free_parms *parms __rte_unused)
82 {
83         return 0;
84 }
85
86 int
87 tf_rm_is_allocated(struct tf_rm_is_allocated_parms *parms __rte_unused)
88 {
89         return 0;
90 }
91
92 int
93 tf_rm_get_info(struct tf_rm_get_alloc_info_parms *parms __rte_unused)
94 {
95         return 0;
96 }
97
98 int
99 tf_rm_get_hcapi_type(struct tf_rm_get_hcapi_parms *parms __rte_unused)
100 {
101         return 0;
102 }