+
+int
+tf_ident_get_resc_info(struct tf *tfp,
+ struct tf_identifier_resource_info *ident)
+{
+ int rc;
+ int d;
+ struct tf_resource_info *dinfo;
+ struct tf_rm_get_alloc_info_parms ainfo;
+ void *ident_db_ptr = NULL;
+ struct ident_rm_db *ident_db;
+
+ TF_CHECK_PARMS2(tfp, ident);
+
+ rc = tf_session_get_db(tfp, TF_MODULE_TYPE_IDENTIFIER, &ident_db_ptr);
+ if (rc) {
+ TFP_DRV_LOG(INFO,
+ "No resource allocated for ident from session\n");
+ return 0;
+ }
+ ident_db = (struct ident_rm_db *)ident_db_ptr;
+
+ /* check if reserved resource for WC is multiple of num_slices */
+ for (d = 0; d < TF_DIR_MAX; d++) {
+ ainfo.rm_db = ident_db->ident_db[d];
+ dinfo = ident[d].info;
+
+ ainfo.info = (struct tf_rm_alloc_info *)dinfo;
+ ainfo.subtype = 0;
+ rc = tf_rm_get_all_info(&ainfo, TF_IDENT_TYPE_MAX);
+ if (rc)
+ return rc;
+ }
+
+ return 0;
+}