fid_parms.resource_func = ident->resource_func;
fid_parms.resource_type = ident->ident_type;
fid_parms.resource_hndl = iparms.id;
- fid_parms.critical_resource = 0;
+ fid_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
rc = ulp_flow_db_resource_add(parms->ulp_ctx,
parms->tbl_idx,
}
fid_parms.direction = tbl->direction;
fid_parms.resource_func = BNXT_ULP_RESOURCE_FUNC_HW_FID;
- fid_parms.critical_resource = 0;
+ fid_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
fid_parms.resource_type = mark_flag;
fid_parms.resource_hndl = gfid;
rc = ulp_flow_db_resource_add(parms->ulp_ctx,
}
fid_parms.direction = tbl->direction;
fid_parms.resource_func = BNXT_ULP_RESOURCE_FUNC_HW_FID;
- fid_parms.critical_resource = 0;
+ fid_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
fid_parms.resource_type = mark_flag;
fid_parms.resource_hndl = act_idx;
rc = ulp_flow_db_resource_add(parms->ulp_ctx,
fid_parms.resource_func = tbl->resource_func;
fid_parms.resource_type = tbl->resource_type;
fid_parms.resource_hndl = aparms.idx;
- fid_parms.critical_resource = 0;
+ fid_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
rc = ulp_flow_db_resource_add(parms->ulp_ctx,
parms->tbl_idx,
* Set the critical resource on the first resource del, then iterate
* while status is good
*/
- res_parms.critical_resource = 1;
+ res_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES;
rc = ulp_flow_db_resource_del(ulp_ctx, tbl_type, fid, &res_parms);
if (rc) {
tbl_type, fid, res_parms.resource_func,
res_parms.resource_hndl, trc);
- /* All subsequent call require the critical_resource be zero */
- res_parms.critical_resource = 0;
+ /* All subsequent call require the non-critical_resource */
+ res_parms.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
rc = ulp_flow_db_resource_del(ulp_ctx,
tbl_type,
.ident_start_idx = 0,
.ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
- .critical_resource = 0,
+ .critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.ident_start_idx = 1,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
- .critical_resource = 0,
+ .critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.ident_start_idx = 1,
.ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
- .critical_resource = 0,
+ .critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.ident_start_idx = 2,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
- .critical_resource = 0,
+ .critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.ident_start_idx = 2,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_YES,
- .critical_resource = 1,
+ .critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
}
};
BNXT_ULP_CF_IDX_LAST = 29
};
+enum bnxt_ulp_critical_resource {
+ BNXT_ULP_CRITICAL_RESOURCE_NO = 0,
+ BNXT_ULP_CRITICAL_RESOURCE_YES = 1,
+ BNXT_ULP_CRITICAL_RESOURCE_LAST = 2
+};
+
enum bnxt_ulp_device_id {
BNXT_ULP_DEVICE_ID_WH_PLUS = 0,
BNXT_ULP_DEVICE_ID_THOR = 1,