1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Broadcom
6 #include <rte_common.h>
11 * Resource query single entry. Used when accessing HCAPI RM on the
14 struct tf_rm_query_entry {
15 /** Minimum guaranteed number of elements */
17 /** Maximum non-guaranteed number of elements */
22 * Generic RM Element data type that an RM DB is build upon.
24 struct tf_rm_element {
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.
30 enum tf_rm_elem_cfg_type type;
33 * HCAPI RM Type for the element.
38 * HCAPI RM allocated range information for the element.
40 struct tf_rm_alloc_info alloc;
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.
47 struct bitalloc *pool;
55 * The DB consists of an array of elements
57 struct tf_rm_element *db;
61 tf_rm_create_db(struct tf *tfp __rte_unused,
62 struct tf_rm_create_db_parms *parms __rte_unused)
68 tf_rm_free_db(struct tf *tfp __rte_unused,
69 struct tf_rm_free_db_parms *parms __rte_unused)
75 tf_rm_allocate(struct tf_rm_allocate_parms *parms __rte_unused)
81 tf_rm_free(struct tf_rm_free_parms *parms __rte_unused)
87 tf_rm_is_allocated(struct tf_rm_is_allocated_parms *parms __rte_unused)
93 tf_rm_get_info(struct tf_rm_get_alloc_info_parms *parms __rte_unused)
99 tf_rm_get_hcapi_type(struct tf_rm_get_hcapi_parms *parms __rte_unused)