X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftf_rm.h;h=291086c7c70e03ce5f8ad953af1f726bdc094965;hb=539931eab3a5f81adaaac583e792ac1e4237db20;hp=971120a9189c3053657de24b237854807059ec3f;hpb=8ee821cfae8fe4fdc61f5265c020a490342ece0e;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tf_rm.h b/drivers/net/bnxt/tf_core/tf_rm.h index 971120a918..291086c7c7 100644 --- a/drivers/net/bnxt/tf_core/tf_rm.h +++ b/drivers/net/bnxt/tf_core/tf_rm.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019-2020 Broadcom + * Copyright(c) 2019-2021 Broadcom * All rights reserved. */ @@ -314,6 +314,29 @@ struct tf_rm_get_inuse_count_parms { uint16_t *count; }; +/** + * Check if the indexes are in the range of reserved resource + */ +struct tf_rm_check_indexes_in_range_parms { + /** + * [in] RM DB Handle + */ + void *rm_db; + /** + * [in] DB Index, indicates which DB entry to perform the + * action on. + */ + uint16_t db_index; + /** + * [in] Starting index + */ + uint16_t starting_index; + /** + * [in] number of entries + */ + uint16_t num_entries; +}; + /** * @page rm Resource Manager * @@ -462,4 +485,18 @@ int tf_rm_get_hcapi_type(struct tf_rm_get_hcapi_parms *parms); */ int tf_rm_get_inuse_count(struct tf_rm_get_inuse_count_parms *parms); +/** + * Check if the requested indexes are in the range of reserved resource. + * + * [in] parms + * Pointer to get inuse parameters + * + * Returns + * - (0) if successful. + * - (-EINVAL) on failure. + */ +int +tf_rm_check_indexes_in_range(struct tf_rm_check_indexes_in_range_parms *parms); + + #endif /* TF_RM_NEW_H_ */