#include <string.h>
#include <rte_common.h>
+#include <rte_debug.h>
#include <cfa_resource_types.h>
/* Get Firmware Capabilities */
rc = tf_msg_session_resc_qcaps(tfp,
+ dev,
parms->dir,
max_types,
query,
req[j].max = parms->alloc_cnt[i];
j++;
} else {
+ const char *type_str;
+ uint16_t hcapi_type = parms->cfg[i].hcapi_type;
+
+ dev->ops->tf_dev_get_resource_str(tfp,
+ hcapi_type,
+ &type_str);
TFP_DRV_LOG(ERR,
- "%s: Resource failure, type:%d\n",
- tf_dir_2_str(parms->dir),
- parms->cfg[i].hcapi_type);
+ "%s: Resource failure, type:%d:%s\n",
+ tf_dir_2_str(parms->dir),
+ hcapi_type, type_str);
TFP_DRV_LOG(ERR,
"req:%d, avail:%d\n",
parms->alloc_cnt[i],
- query[parms->cfg[i].hcapi_type].max);
+ query[hcapi_type].max);
return -EINVAL;
}
}
}
rc = tf_msg_session_resc_alloc(tfp,
+ dev,
parms->dir,
hcapi_items,
req,
rm_db->type = parms->type;
*parms->rm_db = (void *)rm_db;
-#if (TF_RM_DEBUG == 1)
- printf("%s: type:%d num_entries:%d\n",
- tf_dir_2_str(parms->dir),
- parms->type,
- i);
-#endif /* (TF_RM_DEBUG == 1) */
-
tfp_free((void *)req);
tfp_free((void *)resv);