struct tf_tcam_cfg_parms *parms)
{
int rc;
+ int db_rc[TF_DIR_MAX] = { 0 };
int i, d;
struct tf_rm_alloc_info info;
struct tf_rm_free_db_parms fparms;
db_cfg.rm_db = (void *)&tcam_db->tcam_db[d];
if (tf_session_is_shared_session(tfs) &&
(!tf_session_is_shared_session_creator(tfs)))
- rc = tf_rm_create_db_no_reservation(tfp, &db_cfg);
+ db_rc[d] = tf_rm_create_db_no_reservation(tfp, &db_cfg);
else
- rc = tf_rm_create_db(tfp, &db_cfg);
- if (rc) {
- TFP_DRV_LOG(ERR,
+ db_rc[d] = tf_rm_create_db(tfp, &db_cfg);
+ if (db_rc[d]) {
+ TFP_DRV_LOG(INFO,
"%s: TCAM DB creation failed\n",
tf_dir_2_str(d));
- return rc;
}
}
+ /* No db created */
+ if (db_rc[TF_DIR_RX] && db_rc[TF_DIR_TX])
+ return db_rc[TF_DIR_RX];
+
/* check if reserved resource for WC is multiple of num_slices */
for (d = 0; d < TF_DIR_MAX; d++) {
memset(&info, 0, sizeof(info));