X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftf_identifier.c;h=c491f77a2b478349b1d4f3c0b74436648514457f;hb=f1f6ebc0eaf68a825c6175f5e6a436f7d91660c3;hp=3575c3e1a01d1ed889f8870c135073a4c4a32f61;hpb=872860927003ab731bc1dfa69c6027e132d0ee07;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tf_identifier.c b/drivers/net/bnxt/tf_core/tf_identifier.c index 3575c3e1a0..c491f77a2b 100644 --- a/drivers/net/bnxt/tf_core/tf_identifier.c +++ b/drivers/net/bnxt/tf_core/tf_identifier.c @@ -74,11 +74,6 @@ tf_ident_bind(struct tf *tfp, db_rc[i] = tf_rm_create_db_no_reservation(tfp, &db_cfg); else db_rc[i] = tf_rm_create_db(tfp, &db_cfg); - if (db_rc[i]) { - TFP_DRV_LOG(INFO, - "%s: No Identifier DB required\n", - tf_dir_2_str(i)); - } if (parms->shadow_copy) { shadow_cfg.alloc_cnt = @@ -99,8 +94,10 @@ tf_ident_bind(struct tf *tfp, } /* No db created */ - if (db_rc[TF_DIR_RX] && db_rc[TF_DIR_TX]) + if (db_rc[TF_DIR_RX] && db_rc[TF_DIR_TX]) { + TFP_DRV_LOG(ERR, "No Identifier DB created\n"); return db_rc[TF_DIR_RX]; + } TFP_DRV_LOG(INFO, "Identifier - initialized\n"); @@ -121,12 +118,8 @@ tf_ident_unbind(struct tf *tfp) TF_CHECK_PARMS1(tfp); rc = tf_session_get_db(tfp, TF_MODULE_TYPE_IDENTIFIER, &ident_db_ptr); - if (rc) { - TFP_DRV_LOG(INFO, - "Ident_db is not initialized, rc:%s\n", - strerror(-rc)); + if (rc) return 0; - } ident_db = (struct ident_rm_db *)ident_db_ptr; for (i = 0; i < TF_DIR_MAX; i++) { @@ -376,16 +369,20 @@ tf_ident_get_resc_info(struct tf *tfp, 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; - } + if (rc == -ENOMEM) + return 0; /* db doesn't exist */ + else if (rc) + return rc; /* error getting db */ + 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]; + + if (!ainfo.rm_db) + continue; + dinfo = ident[d].info; ainfo.info = (struct tf_rm_alloc_info *)dinfo;