X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_ulp%2Fulp_mark_mgr.c;h=271520e1d3787e21fc58129a0f5ba6310af1527b;hb=45633c460c223a67dd1a7cc084c3eceb5e17687c;hp=06ad5a94e268db229141630fabb2f8a4934727fc;hpb=2addc463eed9e2d7cbda25b7bf9d2ed1412b7236;p=dpdk.git diff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c index 06ad5a94e2..271520e1d3 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c @@ -73,6 +73,12 @@ ulp_mark_db_init(struct bnxt_ulp_context *ctxt) return -EINVAL; } + if (!dparms->mark_db_lfid_entries || !dparms->mark_db_gfid_entries) { + BNXT_TF_DBG(DEBUG, "mark Table is not allocated\n"); + bnxt_ulp_cntxt_ptr2_mark_db_set(ctxt, NULL); + return 0; + } + mark_tbl = rte_zmalloc("ulp_rx_mark_tbl_ptr", sizeof(struct bnxt_ulp_mark_tbl), 0); if (!mark_tbl) @@ -182,10 +188,8 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, return -EINVAL; mtbl = bnxt_ulp_cntxt_ptr2_mark_db_get(ctxt); - if (!mtbl) { - BNXT_TF_DBG(ERR, "Unable to get Mark Table\n"); + if (!mtbl) return -EINVAL; - } idx = ulp_mark_db_idx_get(is_gfid, fid, mtbl);