return -EINVAL;
}
- idx = ident->regfile_wr_idx;
+ idx = ident->regfile_idx;
iparms.ident_type = ident->ident_type;
iparms.dir = tbl->direction;
mark = tfp_be_to_cpu_32(mark);
if (!ulp_regfile_read(parms->regfile,
- BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN,
+ BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR,
&val64)) {
BNXT_TF_DBG(ERR, "read action ptr main failed\n");
return -EINVAL;
/* Always storing values in Regfile in BE */
idx = tfp_cpu_to_be_64(idx);
- rc = ulp_regfile_write(parms->regfile, tbl->regfile_wr_idx, idx);
+ rc = ulp_regfile_write(parms->regfile, tbl->regfile_idx, idx);
if (!rc) {
BNXT_TF_DBG(ERR, "Write regfile[%d] failed\n",
- tbl->regfile_wr_idx);
+ tbl->regfile_idx);
goto error;
}
for (i = 0; i < num_idents; i++) {
regval = (uint64_t)cache_entry->idents[i];
if (!ulp_regfile_write(parms->regfile,
- idents[i].regfile_wr_idx,
+ idents[i].regfile_idx,
tfp_cpu_to_be_64(regval))) {
BNXT_TF_DBG(ERR,
"Failed to write to regfile\n");
};
struct bnxt_ulp_cache_tbl_params ulp_cache_tbl_params[] = {
- [BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_INGRESS] = {
- .num_entries = 16384
- },
- [BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_EGRESS] = {
- .num_entries = 16384
- },
- [BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_INGRESS] = {
- .num_entries = 16384
- },
- [BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_EGRESS] = {
- .num_entries = 16384
- }
};
struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_CACHE_TABLE,
.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_TT_L2_CNTXT_TCAM_CACHE,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_L2_CNTXT_TCAM,
.direction = TF_DIR_RX,
.priority = BNXT_ULP_PRIORITY_NOT_USED,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED,
.direction = TF_DIR_RX,
.priority = BNXT_ULP_PRIORITY_LEVEL_0,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_CACHE_TABLE,
.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_TT_PROFILE_TCAM_CACHE,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_PROFILE_TCAM,
.direction = TF_DIR_RX,
.priority = BNXT_ULP_PRIORITY_NOT_USED,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_TT_PROFILE_TCAM_CACHE,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_PROFILE_TCAM,
.direction = TF_DIR_RX,
.priority = BNXT_ULP_PRIORITY_LEVEL_0,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
.resource_type = TF_MEM_EXTERNAL,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED,
.direction = TF_DIR_RX,
.priority = BNXT_ULP_PRIORITY_NOT_USED,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_YES,
.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
}
};
{
.field_bit_size = 33,
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_REGFILE,
- .result_operand = {(BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN >> 8) & 0xff,
- BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN & 0xff,
+ .result_operand = {(BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR >> 8) & 0xff,
+ BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR & 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.ident_type = TF_IDENT_TYPE_L2_CTXT,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0,
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0,
.ident_bit_size = 10,
.ident_bit_pos = 0
},
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.ident_type = TF_IDENT_TYPE_EM_PROF,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0,
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0,
.ident_bit_size = 10,
.ident_bit_pos = 0
}
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
.resource_type = TF_TBL_TYPE_EXT,
- .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_IT_NORMAL,
+ .resource_sub_type =
+ BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL,
.direction = TF_DIR_RX,
.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
.result_start_idx = 0,
.result_bit_size = 128,
.result_num_fields = 26,
.encap_num_fields = 0,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN
+ .regfile_idx = BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR
}
};
#ifndef ULP_TEMPLATE_DB_H_
#define ULP_TEMPLATE_DB_H_
-#define BNXT_ULP_REGFILE_MAX_SZ 16
+#define BNXT_ULP_REGFILE_MAX_SZ 15
#define BNXT_ULP_MAX_NUM_DEVICES 4
#define BNXT_ULP_LOG2_MAX_NUM_DEV 2
#define BNXT_ULP_CACHE_TBL_MAX_SZ 4
BNXT_ULP_BYTE_ORDER_LAST = 2
};
-enum bnxt_ulp_cache_tbl_id {
- BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_INGRESS = 0,
- BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_EGRESS = 1,
- BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_INGRESS = 2,
- BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_EGRESS = 3,
- BNXT_ULP_CACHE_TBL_ID_LAST = 4
-};
-
enum bnxt_ulp_cf_idx {
BNXT_ULP_CF_IDX_MPLS_TAG_NUM = 0,
BNXT_ULP_CF_IDX_O_VTAG_NUM = 1,
BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_1 = 6,
BNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_0 = 7,
BNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_1 = 8,
- BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN = 9,
+ BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR = 9,
BNXT_ULP_REGFILE_INDEX_ACTION_PTR_0 = 10,
BNXT_ULP_REGFILE_INDEX_ENCAP_PTR_0 = 11,
BNXT_ULP_REGFILE_INDEX_ENCAP_PTR_1 = 12,
BNXT_ULP_REGFILE_INDEX_CRITICAL_RESOURCE = 13,
- BNXT_ULP_REGFILE_INDEX_CACHE_ENTRY_PTR = 14,
- BNXT_ULP_REGFILE_INDEX_NOT_USED = 15,
- BNXT_ULP_REGFILE_INDEX_LAST = 16
+ BNXT_ULP_REGFILE_INDEX_NOT_USED = 14,
+ BNXT_ULP_REGFILE_INDEX_LAST = 15
};
enum bnxt_ulp_result_opc {
};
enum bnxt_ulp_resource_sub_type {
- BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED = 0,
- BNXT_ULP_RESOURCE_SUB_TYPE_IT_NORMAL = 0,
- BNXT_ULP_RESOURCE_SUB_TYPE_IT_VFR_ACT_IDX = 1,
- BNXT_ULP_RESOURCE_SUB_TYPE_IT_INT_CNT_IDX = 2,
- BNXT_ULP_RESOURCE_SUB_TYPE_IT_EXT_CNT_IDX = 3,
- BNXT_ULP_RESOURCE_SUB_TYPE_TT_L2_CNTXT_TCAM_CACHE = 0,
- BNXT_ULP_RESOURCE_SUB_TYPE_TT_PROFILE_TCAM_CACHE = 1
+ BNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_L2_CNTXT_TCAM = 0,
+ BNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_PROFILE_TCAM = 1,
+ BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_EXT_CNT_IDX = 3,
+ BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_CNT_IDX = 2,
+ BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL = 0,
+ BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_VFR_ACT_IDX = 1,
+ BNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED = 0
};
enum bnxt_ulp_sym {