net/bnxt: refactor flow parser in ULP

1. Remove Ether type, VLAN type and IP proto type from pattern matching,
since the header bits can be used for matching. This reduces the class
template signatures by a factor of 8.

2. Remove the wild card bit in the pattern matching since same template
can be used for both exact and wild card entries.

3. The action record pointers have to use higher range to not collide
with the firmware action record pointers. Hence reduced the number of
action record pointers for Whitney platform.

4. The conditional update opcode provide functionality to reject flows
for instance reject flows that do not adhere to flow signature match.

5. Added check to not populate protocol specifications if the
protocol mask is null or zero.

6. Check that field array is not overrun.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
Kishore Padmanabha 2021-05-30 14:29:18 +05:30 committed by Ajit Khaparde
parent 3fe124d253
commit 741172be52
15 changed files with 11779 additions and 97970 deletions

View File

@ -94,7 +94,7 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp,
/* Table Types */
res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 16384;
res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 8192;
res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
/* ENCAP */
@ -130,7 +130,7 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp,
/* Table Types */
res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 16384;
res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 8192;
res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
/* ENCAP */

View File

@ -2844,45 +2844,6 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
return rc;
}
/*
* Function to process the memtype opcode of the mapper table.
* returns 1 to skip the table.
* return 0 to continue processing the table.
*
* defaults to skip
*/
static int32_t
ulp_mapper_tbl_memtype_opcode_process(struct bnxt_ulp_mapper_parms *parms,
struct bnxt_ulp_mapper_tbl_info *tbl)
{
enum bnxt_ulp_flow_mem_type mtype = BNXT_ULP_FLOW_MEM_TYPE_INT;
int32_t rc = 1;
if (bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype)) {
BNXT_TF_DBG(ERR, "Failed to get the mem type\n");
return rc;
}
switch (tbl->mem_type_opcode) {
case BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT:
if (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT)
rc = 0;
break;
case BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT:
if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT)
rc = 0;
break;
case BNXT_ULP_MEM_TYPE_OPC_NOP:
rc = 0;
break;
default:
BNXT_TF_DBG(ERR,
"Invalid arg in mapper in memtype opcode\n");
break;
}
return rc;
}
/*
* Common conditional opcode process routine that is used for both the template
* rejection and table conditional execution.
@ -2893,6 +2854,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
uint32_t operand,
int32_t *res)
{
enum bnxt_ulp_flow_mem_type mtype = BNXT_ULP_FLOW_MEM_TYPE_INT;
int32_t rc = 0;
uint8_t bit;
uint64_t regval;
@ -3002,6 +2964,20 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
return -EINVAL;
}
break;
case BNXT_ULP_COND_OPC_EXT_MEM_IS_SET:
if (bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype)) {
BNXT_TF_DBG(ERR, "Failed to get the mem type\n");
return -EINVAL;
}
*res = (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT) ? 0 : 1;
break;
case BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET:
if (bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype)) {
BNXT_TF_DBG(ERR, "Failed to get the mem type\n");
return -EINVAL;
}
*res = (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT) ? 1 : 0;
break;
default:
BNXT_TF_DBG(ERR, "Invalid conditional opcode %d\n", opc);
rc = -EINVAL;
@ -3010,6 +2986,113 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
return (rc);
}
static int32_t
ulp_mapper_cc_upd_opr_compute(struct bnxt_ulp_mapper_parms *parms,
enum tf_dir dir,
enum bnxt_ulp_cc_upd_src cc_src,
uint16_t cc_opr,
uint64_t *result)
{
uint64_t regval;
*result = false;
switch (cc_src) {
case BNXT_ULP_CC_UPD_SRC_COMP_FIELD:
if (cc_opr >= BNXT_ULP_CF_IDX_LAST) {
BNXT_TF_DBG(ERR, "invalid index %u\n", cc_opr);
return -EINVAL;
}
*result = (uint64_t)ULP_COMP_FLD_IDX_RD(parms, cc_opr);
break;
case BNXT_ULP_CC_UPD_SRC_REGFILE:
if (!ulp_regfile_read(parms->regfile, cc_opr, &regval)) {
BNXT_TF_DBG(ERR, "regfile[%d] read oob\n", cc_opr);
return -EINVAL;
}
*result = tfp_be_to_cpu_64(regval);
break;
case BNXT_ULP_CC_UPD_SRC_GLB_REGFILE:
if (ulp_mapper_glb_resource_read(parms->mapper_data, dir,
cc_opr, &regval)) {
BNXT_TF_DBG(ERR, "global regfile[%d] read failed.\n",
cc_opr);
return -EINVAL;
}
*result = tfp_be_to_cpu_64(regval);
break;
default:
BNXT_TF_DBG(ERR, "invalid src code %u\n", cc_src);
return -EINVAL;
}
return 0;
}
static int32_t
ulp_mapper_cc_upd_info_process(struct bnxt_ulp_mapper_parms *parms,
struct bnxt_ulp_mapper_tbl_info *tbl)
{
struct bnxt_ulp_mapper_cc_upd_info *cc_upd = &tbl->cc_upd_info;
uint64_t res = 0, res1, res2;
int32_t rc = 0;
if (cc_upd->cc_opc == BNXT_ULP_CC_UPD_OPC_NOP)
return rc;
rc = ulp_mapper_cc_upd_opr_compute(parms, tbl->direction,
cc_upd->cc_src1,
cc_upd->cc_opr1, &res1);
if (rc)
return rc;
rc = ulp_mapper_cc_upd_opr_compute(parms, tbl->direction,
cc_upd->cc_src2,
cc_upd->cc_opr2, &res2);
if (rc)
return rc;
switch (cc_upd->cc_opc) {
case BNXT_ULP_CC_UPD_OPC_NOP:
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_EQ:
if (res1 == res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_NE:
if (res1 != res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_GE:
if (res1 >= res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_GT:
if (res1 > res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_LE:
if (res1 <= res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_LT:
if (res1 < res2)
res = 1;
break;
case BNXT_ULP_CC_UPD_OPC_LAST:
BNXT_TF_DBG(ERR, "invalid code %u\n", cc_upd->cc_opc);
return -EINVAL;
}
if (ulp_regfile_write(parms->regfile, cc_upd->cc_dst_opr,
tfp_cpu_to_be_64(res))) {
BNXT_TF_DBG(ERR, "Failed write the cc_opc %u\n",
cc_upd->cc_dst_opr);
return -EINVAL;
}
return rc;
}
/*
* Processes a list of conditions and returns both a status and result of the
* list. The status must be checked prior to verifying the result.
@ -3045,6 +3128,7 @@ ulp_mapper_cond_opc_list_process(struct bnxt_ulp_mapper_parms *parms,
default:
BNXT_TF_DBG(ERR, "Invalid conditional list opcode %d\n",
list_opc);
*res = 0;
return -EINVAL;
}
@ -3184,10 +3268,11 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
for (tbl_idx = 0; tbl_idx < num_tbls && cond_goto;) {
tbl = &tbls[tbl_idx];
/* Handle the table level opcodes to determine if required. */
if (ulp_mapper_tbl_memtype_opcode_process(parms, tbl)) {
cond_goto = tbl->execute_info.cond_false_goto;
goto next_iteration;
/* Process the conditional code update opcodes */
if (ulp_mapper_cc_upd_info_process(parms, tbl)) {
BNXT_TF_DBG(ERR, "Failed to process cond update\n");
rc = -EINVAL;
goto error;
}
cond_tbls = ulp_mapper_tbl_execute_list_get(parms, tbl,
@ -3199,7 +3284,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
if (rc) {
BNXT_TF_DBG(ERR, "Failed to process cond opc list "
"(%d)\n", rc);
return rc;
goto error;
}
/* Skip the table if False */
if (!cond_rc) {
@ -3251,6 +3336,26 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
goto error;
}
next_iteration:
if (cond_goto == BNXT_ULP_COND_GOTO_REJECT) {
BNXT_TF_DBG(ERR, "reject the flow\n");
rc = -EINVAL;
goto error;
} else if (cond_goto & BNXT_ULP_COND_GOTO_RF) {
uint32_t rf_idx;
uint64_t regval;
/* least significant 16 bits from reg_file index */
rf_idx = (uint32_t)(cond_goto & 0xFFFF);
if (!ulp_regfile_read(parms->regfile, rf_idx,
&regval)) {
BNXT_TF_DBG(ERR, "regfile[%d] read oob\n",
rf_idx);
rc = -EINVAL;
goto error;
}
cond_goto = (int32_t)regval;
}
if (cond_goto < 0 && ((int32_t)tbl_idx + cond_goto) < 0) {
BNXT_TF_DBG(ERR, "invalid conditional goto %d\n",
cond_goto);

View File

@ -26,7 +26,7 @@ struct bnxt_ulp_mapper_glb_resource_entry {
struct bnxt_ulp_mapper_data {
struct bnxt_ulp_mapper_glb_resource_entry
glb_res_tbl[TF_DIR_MAX][BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ];
glb_res_tbl[TF_DIR_MAX][BNXT_ULP_GLB_RF_IDX_LAST];
struct ulp_mapper_gen_tbl_list gen_tbl_list[BNXT_ULP_GEN_TBL_MAX_SZ];
};

View File

@ -52,7 +52,7 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,
/* calculate the hash of the given flow */
class_hid = ulp_matcher_class_hash_calculate(params->hdr_bitmap.bits,
params->fld_bitmap.bits);
params->fld_s_bitmap.bits);
/* validate the calculate hash values */
if (class_hid >= BNXT_ULP_CLASS_SIG_TBL_MAX_SZ)
@ -66,7 +66,7 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,
BNXT_TF_DBG(DEBUG, "Proto Header does not match\n");
goto error;
}
if (ULP_BITMAP_CMP(&params->fld_bitmap, &class_match->field_sig)) {
if (ULP_BITMAP_CMP(&params->fld_s_bitmap, &class_match->field_sig)) {
BNXT_TF_DBG(DEBUG, "Field signature does not match\n");
goto error;
}

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,13 @@
#define BNXT_ULP_PARSER_IPV6_TC 0x0ff00000
#define BNXT_ULP_PARSER_IPV6_FLOW_LABEL 0x000fffff
enum bnxt_ulp_prsr_action {
ULP_PRSR_ACT_DEFAULT = 0,
ULP_PRSR_ACT_MATCH_IGNORE = 1,
ULP_PRSR_ACT_MASK_IGNORE = 2,
ULP_PRSR_ACT_SPEC_IGNORE = 4
};
void
bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,
struct ulp_rte_parser_params *params,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
* All rights reserved.
*/
/* date: Thu Mar 4 10:12:06 2021 */
/* date: Mon Mar 8 17:37:39 2021 */
#include "ulp_template_db_enum.h"
#include "ulp_template_db_field.h"
@ -227,52 +227,81 @@ struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
/* List of device specific parameters */
struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
[0] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
.direction = TF_DIR_RX
},
[1] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
.direction = TF_DIR_TX
},
[2] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
.resource_type = TF_TBL_TYPE_FULL_ACT_RECORD,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
.direction = TF_DIR_TX
},
[3] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
.direction = TF_DIR_RX
},
[4] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
.direction = TF_DIR_TX
},
[5] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_VXLAN_PROF_FUNC_ID,
.direction = TF_DIR_RX
},
[6] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
.resource_type = TF_TBL_TYPE_ACT_ENCAP_16B,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
.direction = TF_DIR_RX
},
[7] = {
.device_id = BNXT_ULP_DEVICE_ID_WH_PLUS,
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
.resource_type = TF_TBL_TYPE_ACT_ENCAP_16B,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
.direction = TF_DIR_TX
},
[8] = {
.device_id = BNXT_ULP_DEVICE_ID_THOR,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
.direction = TF_DIR_RX
},
[9] = {
.device_id = BNXT_ULP_DEVICE_ID_THOR,
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.resource_type = TF_IDENT_TYPE_PROF_FUNC,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
.direction = TF_DIR_TX
},
[10] = {
.device_id = BNXT_ULP_DEVICE_ID_THOR,
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
.resource_type = TF_TBL_TYPE_FULL_ACT_RECORD,
.glb_regfile_index = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
.direction = TF_DIR_TX
}
};

View File

@ -53,7 +53,6 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,

View File

@ -29,7 +29,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_wh_plus_act_tmpl_list[] = {
.start_tbl_idx = 5,
.reject_info = {
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
.cond_start_idx = 12,
.cond_start_idx = 14,
.cond_nums = 0 }
},
/* act_tid: 3, wh_plus, ingress */
@ -39,7 +39,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_wh_plus_act_tmpl_list[] = {
.start_tbl_idx = 12,
.reject_info = {
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 0 }
},
/* act_tid: 4, wh_plus, egress */
@ -49,7 +49,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_wh_plus_act_tmpl_list[] = {
.start_tbl_idx = 18,
.reject_info = {
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
.cond_start_idx = 16,
.cond_start_idx = 20,
.cond_nums = 0 }
},
/* act_tid: 5, wh_plus, egress */
@ -59,7 +59,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_wh_plus_act_tmpl_list[] = {
.start_tbl_idx = 23,
.reject_info = {
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
.cond_start_idx = 20,
.cond_start_idx = 28,
.cond_nums = 0 }
},
/* act_tid: 6, wh_plus, egress */
@ -69,7 +69,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_wh_plus_act_tmpl_list[] = {
.start_tbl_idx = 29,
.reject_info = {
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
.cond_start_idx = 23,
.cond_start_idx = 33,
.cond_nums = 0 }
}
};
@ -89,7 +89,6 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.key_start_idx = 0,
@ -113,7 +112,6 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
@ -127,7 +125,6 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
@ -136,7 +133,6 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_ENCAP_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
@ -151,16 +147,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 12,
.cond_nums = 0 },
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
@ -175,16 +169,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 12,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 13,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
@ -200,9 +192,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 12,
.cond_start_idx = 14,
.cond_nums = 0 },
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
.fdb_operand = BNXT_ULP_RF_IDX_RID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE
@ -217,11 +208,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 12,
.cond_start_idx = 14,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MIRROR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
.fdb_operand = BNXT_ULP_RF_IDX_RID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
@ -240,11 +230,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 12,
.cond_start_idx = 14,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
.fdb_operand = BNXT_ULP_RF_IDX_RID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
@ -259,16 +248,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
.fdb_operand = BNXT_ULP_RF_IDX_RID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
@ -284,16 +271,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
.fdb_operand = BNXT_ULP_RF_IDX_RID,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
@ -313,11 +298,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MIRROR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
@ -335,11 +319,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.key_start_idx = 1,
@ -360,11 +343,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 13,
.cond_start_idx = 15,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 156,
@ -381,11 +363,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 14,
.cond_start_idx = 16,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_IPV4_SRC_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 157,
@ -402,11 +383,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 15,
.cond_start_idx = 17,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_IPV4_DST_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 158,
@ -423,11 +403,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 16,
.cond_start_idx = 18,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
.tbl_operand = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 159,
@ -441,16 +420,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 16,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 18,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 171,
@ -463,16 +440,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_RX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 16,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 19,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 197,
@ -490,11 +465,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 16,
.cond_start_idx = 20,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 235,
@ -507,16 +481,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 17,
.cond_nums = 1 },
.cond_start_idx = 21,
.cond_nums = 2 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_ENCAP_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 236,
@ -530,16 +502,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 18,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 23,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 248,
@ -552,16 +522,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 18,
.cond_nums = 1 },
.cond_start_idx = 24,
.cond_nums = 2 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 274,
@ -575,16 +543,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 19,
.cond_nums = 1 },
.cond_start_idx = 26,
.cond_nums = 2 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 312,
@ -602,11 +568,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 20,
.cond_start_idx = 28,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 350,
@ -623,11 +588,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 21,
.cond_start_idx = 29,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_IPV4_SRC_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 351,
@ -644,11 +608,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 22,
.cond_start_idx = 30,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_IPV4_DST_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 352,
@ -665,11 +628,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 23,
.cond_start_idx = 31,
.cond_nums = 0 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
.tbl_operand = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 353,
@ -683,16 +645,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 23,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 31,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 365,
@ -705,16 +665,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 23,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 32,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 391,
@ -732,11 +690,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 23,
.cond_start_idx = 33,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 429,
@ -753,11 +710,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 24,
.cond_start_idx = 34,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_SP_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 430,
@ -775,11 +731,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 25,
.cond_start_idx = 35,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_SP_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 433,
@ -793,16 +748,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 26,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 36,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_ENCAP_PTR_0,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 436,
@ -816,16 +769,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
.execute_info = {
.cond_true_goto = 1,
.cond_false_goto = 1,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 26,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 37,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 448,
@ -838,16 +789,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_act_tbl_list[] = {
.resource_sub_type =
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
.direction = TF_DIR_TX,
.mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
.execute_info = {
.cond_true_goto = 0,
.cond_false_goto = 0,
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
.cond_start_idx = 26,
.cond_nums = 0 },
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
.cond_start_idx = 38,
.cond_nums = 1 },
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
.result_start_idx = 474,
@ -910,6 +859,14 @@ struct bnxt_ulp_mapper_cond_info ulp_wh_plus_act_cond_list[] = {
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
.cond_operand = BNXT_ULP_ACT_BIT_PUSH_VLAN
},
/* cond_execute: act_tid: 1, int_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 1, ext_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
},
/* cond_execute: act_tid: 2, int_flow_counter_tbl.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
@ -930,6 +887,14 @@ struct bnxt_ulp_mapper_cond_info ulp_wh_plus_act_cond_list[] = {
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
.cond_operand = BNXT_ULP_ACT_BIT_SET_IPV4_DST
},
/* cond_execute: act_tid: 3, int_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 3, ext_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
},
/* cond_execute: act_tid: 4, int_flow_counter_tbl.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
@ -937,16 +902,29 @@ struct bnxt_ulp_mapper_cond_info ulp_wh_plus_act_cond_list[] = {
},
/* cond_execute: act_tid: 4, int_vtag_encap_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
.cond_operand = BNXT_ULP_ACT_BIT_PUSH_VLAN
},
/* cond_execute: act_tid: 4, int_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 4, ext_full_act_record.no_tag */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
},
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_NOT_SET,
.cond_operand = BNXT_ULP_ACT_BIT_PUSH_VLAN
},
/* cond_execute: act_tid: 4, ext_full_act_record.one_tag */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
},
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
.cond_operand = BNXT_ULP_ACT_BIT_PUSH_VLAN
},
@ -965,6 +943,14 @@ struct bnxt_ulp_mapper_cond_info ulp_wh_plus_act_cond_list[] = {
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
.cond_operand = BNXT_ULP_ACT_BIT_SET_IPV4_DST
},
/* cond_execute: act_tid: 5, int_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 5, ext_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
},
/* cond_execute: act_tid: 6, int_flow_counter_tbl.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
@ -979,6 +965,18 @@ struct bnxt_ulp_mapper_cond_info ulp_wh_plus_act_cond_list[] = {
{
.cond_opcode = BNXT_ULP_COND_OPC_CF_IS_SET,
.cond_operand = BNXT_ULP_CF_IDX_ACT_ENCAP_IPV6_FLAG
},
/* cond_execute: act_tid: 6, int_tun_encap_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 6, int_full_act_record.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET,
},
/* cond_execute: act_tid: 6, ext_full_act_record_vxlan.0 */
{
.cond_opcode = BNXT_ULP_COND_OPC_EXT_MEM_IS_SET,
}
};

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,7 @@ struct ulp_rte_parser_params {
struct ulp_rte_hdr_bitmap hdr_bitmap;
struct ulp_rte_hdr_bitmap hdr_fp_bit;
struct ulp_rte_field_bitmap fld_bitmap;
struct ulp_rte_field_bitmap fld_s_bitmap;
struct ulp_rte_hdr_field hdr_field[BNXT_ULP_PROTO_HDR_MAX];
uint32_t comp_fld[BNXT_ULP_CF_IDX_LAST];
uint32_t field_idx;
@ -172,6 +173,15 @@ struct bnxt_ulp_mapper_cond_list_info {
int32_t cond_false_goto;
};
struct bnxt_ulp_mapper_cc_upd_info {
enum bnxt_ulp_cc_upd_opc cc_opc;
enum bnxt_ulp_cc_upd_src cc_src1;
enum bnxt_ulp_cc_upd_src cc_src2;
uint16_t cc_opr1;
uint16_t cc_opr2;
uint16_t cc_dst_opr;
};
struct bnxt_ulp_template_device_tbls {
struct bnxt_ulp_mapper_tmpl_info *tmpl_list;
uint32_t tmpl_list_size;
@ -231,9 +241,9 @@ struct bnxt_ulp_mapper_tbl_info {
uint32_t resource_type; /* TF_ enum type */
enum bnxt_ulp_resource_sub_type resource_sub_type;
struct bnxt_ulp_mapper_cond_list_info execute_info;
struct bnxt_ulp_mapper_cc_upd_info cc_upd_info;
enum bnxt_ulp_cond_opc cond_opcode;
uint32_t cond_operand;
enum bnxt_ulp_mem_type_opc mem_type_opcode;
uint8_t direction;
enum bnxt_ulp_pri_opc pri_opcode;
uint32_t pri_operand;
@ -302,6 +312,7 @@ struct bnxt_ulp_mapper_ident_info {
};
struct bnxt_ulp_glb_resource_info {
enum bnxt_ulp_device_id device_id;
enum bnxt_ulp_resource_func resource_func;
uint32_t resource_type; /* TF_ enum type */
enum bnxt_ulp_glb_rf_idx glb_regfile_index;

View File

@ -1085,7 +1085,7 @@ uint32_t ulp_bitmap_is_ones(uint8_t *bitmap, int32_t size)
}
/* Function to check if bitmap is not zero. Return 1 on success */
uint32_t ulp_bitmap_notzero(uint8_t *bitmap, int32_t size)
uint32_t ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size)
{
while (size-- > 0) {
if (*bitmap != 0)

View File

@ -521,7 +521,7 @@ uint32_t ulp_bitmap_is_zero(uint8_t *bitmap, int32_t size);
uint32_t ulp_bitmap_is_ones(uint8_t *bitmap, int32_t size);
/* Function to check if bitmap is not zero. Return 1 on success */
uint32_t ulp_bitmap_notzero(uint8_t *bitmap, int32_t size);
uint32_t ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size);
/* returns 0 if input is power of 2 */
int32_t ulp_util_is_power_of_2(uint64_t x);