net/bnxt: refactor mapper opcodes
Unify the opcodes of the different enums into a single enum for reuse of common processors. Also the ADD_PAD opcode is now SET_TO_ZERO. This change better reflects the intent of the opcode and allows it to be used in more circumstances without overloading the term pad. The fields that were setting a constant zero have now been switched to use the new SET_TO_ZERO opcode as an optimization. The SET_TO_ZERO does not copy data into the key/result/mask fields, but rather simply increments the write pointer. Signed-off-by: Mike Baucom <michael.baucom@broadcom.com> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
parent
8ce17d56a1
commit
a465172543
@ -615,14 +615,14 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
uint8_t act_val;
|
||||
|
||||
switch (fld->result_opcode) {
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT:
|
||||
val = fld->result_operand;
|
||||
if (!ulp_blob_push(blob, val, fld->field_bit_size)) {
|
||||
BNXT_TF_DBG(ERR, "%s failed to add field\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&idx, sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s operand read failed\n", name);
|
||||
@ -646,7 +646,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_ACT_BIT:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_ACT_BIT:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&act_bit, sizeof(uint64_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s operand read failed\n", name);
|
||||
@ -664,7 +664,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
}
|
||||
val = &act_val;
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&idx, sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s operand read failed\n", name);
|
||||
@ -696,7 +696,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
val_size = ULP_BYTE_2_BITS(val_size);
|
||||
ulp_blob_push_encap(blob, val, val_size);
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_REGFILE:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_REGFILE:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&idx, sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s operand read failed\n", name);
|
||||
@ -717,7 +717,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_GLB_REGFILE:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_GLB_REGFILE:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
@ -738,7 +738,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_RESULT_OPC_SET_TO_COMP_FIELD:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_COMP_FIELD:
|
||||
if (!ulp_operand_read(fld->result_operand,
|
||||
(uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
@ -753,6 +753,13 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
BNXT_TF_DBG(ERR, "%s push to key blob failed\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_ZERO:
|
||||
if (ulp_blob_pad_push(blob, fld->field_bit_size) < 0) {
|
||||
BNXT_TF_DBG(ERR, "%s too large for blob\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@ -789,21 +796,21 @@ ulp_mapper_keymask_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
bitlen = fld->field_bit_size;
|
||||
|
||||
switch (opcode) {
|
||||
case BNXT_ULP_SPEC_OPC_SET_TO_CONSTANT:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT:
|
||||
val = operand;
|
||||
if (!ulp_blob_push(blob, val, bitlen)) {
|
||||
BNXT_TF_DBG(ERR, "%s push to key blob failed\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_SPEC_OPC_ADD_PAD:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_ZERO:
|
||||
if (!ulp_blob_pad_push(blob, bitlen)) {
|
||||
BNXT_TF_DBG(ERR, "%s pad too large for blob\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
break;
|
||||
case BNXT_ULP_SPEC_OPC_SET_TO_HDR_FIELD:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_HDR_FIELD:
|
||||
if (!ulp_operand_read(operand, (uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
|
||||
@ -830,7 +837,7 @@ ulp_mapper_keymask_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_SPEC_OPC_SET_TO_COMP_FIELD:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_COMP_FIELD:
|
||||
if (!ulp_operand_read(operand, (uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
|
||||
@ -845,7 +852,7 @@ ulp_mapper_keymask_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_SPEC_OPC_SET_TO_REGFILE:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_REGFILE:
|
||||
if (!ulp_operand_read(operand, (uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
|
||||
@ -865,7 +872,7 @@ ulp_mapper_keymask_field_process(struct bnxt_ulp_mapper_parms *parms,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case BNXT_ULP_SPEC_OPC_SET_TO_GLB_REGFILE:
|
||||
case BNXT_ULP_MAPPER_OPC_SET_TO_GLB_REGFILE:
|
||||
if (!ulp_operand_read(operand, (uint8_t *)&idx,
|
||||
sizeof(uint16_t))) {
|
||||
BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
|
||||
|
@ -109,127 +109,87 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = {
|
||||
struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
{
|
||||
.field_bit_size = 14,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 8,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 11,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 4,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {
|
||||
BNXT_ULP_SYM_DECAP_FUNC_THRU_TUN,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -237,7 +197,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 12,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_VNIC >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_VNIC & 0xff,
|
||||
@ -246,151 +206,103 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 2,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 14,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 8,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 11,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 4,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {
|
||||
BNXT_ULP_SYM_DECAP_FUNC_NONE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -398,7 +310,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 12,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_VPORT >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_VPORT & 0xff,
|
||||
@ -407,31 +319,23 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 2,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 3,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {
|
||||
BNXT_ULP_SYM_ECV_TUN_TYPE_VXLAN,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -439,7 +343,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 3,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {
|
||||
BNXT_ULP_SYM_ECV_L4_TYPE_UDP_CSUM,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -447,7 +351,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 3,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_L3_TYPE >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_L3_TYPE & 0xff,
|
||||
@ -456,13 +360,13 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
},
|
||||
{
|
||||
.field_bit_size = 4,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_TYPE >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_TYPE & 0xff,
|
||||
@ -471,19 +375,17 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
},
|
||||
{
|
||||
.field_bit_size = 48,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC & 0xff,
|
||||
@ -492,7 +394,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 0,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG & 0xff,
|
||||
@ -503,7 +405,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 0,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_IP >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_IP & 0xff,
|
||||
@ -514,7 +416,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 32,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP & 0xff,
|
||||
@ -523,7 +425,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 0,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN & 0xff,
|
||||
@ -534,127 +436,87 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 14,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 8,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 11,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 16,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 10,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 4,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {
|
||||
BNXT_ULP_SYM_DECAP_FUNC_NONE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -662,7 +524,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 12,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP,
|
||||
.result_operand = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_VNIC >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_VNIC & 0xff,
|
||||
@ -671,26 +533,18 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 2,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
},
|
||||
{
|
||||
.field_bit_size = 1,
|
||||
.result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
|
||||
.result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
.result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
|
||||
}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -157,13 +157,17 @@ enum bnxt_ulp_mark_enable {
|
||||
BNXT_ULP_MARK_ENABLE_LAST = 2
|
||||
};
|
||||
|
||||
enum bnxt_ulp_mask_opc {
|
||||
BNXT_ULP_MASK_OPC_SET_TO_CONSTANT = 0,
|
||||
BNXT_ULP_MASK_OPC_SET_TO_HDR_FIELD = 1,
|
||||
BNXT_ULP_MASK_OPC_SET_TO_REGFILE = 2,
|
||||
BNXT_ULP_MASK_OPC_SET_TO_GLB_REGFILE = 3,
|
||||
BNXT_ULP_MASK_OPC_ADD_PAD = 4,
|
||||
BNXT_ULP_MASK_OPC_LAST = 5
|
||||
enum bnxt_ulp_mapper_opc {
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT = 0,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_HDR_FIELD = 1,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_COMP_FIELD = 2,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_REGFILE = 3,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_GLB_REGFILE = 4,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_ZERO = 5,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_ACT_BIT = 6,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_ACT_PROP = 7,
|
||||
BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ = 8,
|
||||
BNXT_ULP_MAPPER_OPC_LAST = 9
|
||||
};
|
||||
|
||||
enum bnxt_ulp_match_type {
|
||||
@ -204,33 +208,12 @@ enum bnxt_ulp_regfile_index {
|
||||
BNXT_ULP_REGFILE_INDEX_LAST = 15
|
||||
};
|
||||
|
||||
enum bnxt_ulp_result_opc {
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT = 0,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP = 1,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_ACT_BIT = 2,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ = 3,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_REGFILE = 4,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_GLB_REGFILE = 5,
|
||||
BNXT_ULP_RESULT_OPC_SET_TO_COMP_FIELD = 6,
|
||||
BNXT_ULP_RESULT_OPC_LAST = 7
|
||||
};
|
||||
|
||||
enum bnxt_ulp_search_before_alloc {
|
||||
BNXT_ULP_SEARCH_BEFORE_ALLOC_NO = 0,
|
||||
BNXT_ULP_SEARCH_BEFORE_ALLOC_YES = 1,
|
||||
BNXT_ULP_SEARCH_BEFORE_ALLOC_LAST = 2
|
||||
};
|
||||
|
||||
enum bnxt_ulp_spec_opc {
|
||||
BNXT_ULP_SPEC_OPC_SET_TO_CONSTANT = 0,
|
||||
BNXT_ULP_SPEC_OPC_SET_TO_HDR_FIELD = 1,
|
||||
BNXT_ULP_SPEC_OPC_SET_TO_COMP_FIELD = 2,
|
||||
BNXT_ULP_SPEC_OPC_SET_TO_REGFILE = 3,
|
||||
BNXT_ULP_SPEC_OPC_SET_TO_GLB_REGFILE = 4,
|
||||
BNXT_ULP_SPEC_OPC_ADD_PAD = 5,
|
||||
BNXT_ULP_SPEC_OPC_LAST = 6
|
||||
};
|
||||
|
||||
enum bnxt_ulp_vfr_flag {
|
||||
BNXT_ULP_VFR_FLAG_NO = 0,
|
||||
BNXT_ULP_VFR_FLAG_YES = 1,
|
||||
|
@ -187,17 +187,17 @@ struct bnxt_ulp_mapper_tbl_info {
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_class_key_field_info {
|
||||
uint8_t description[64];
|
||||
enum bnxt_ulp_mask_opc mask_opcode;
|
||||
enum bnxt_ulp_spec_opc spec_opcode;
|
||||
uint16_t field_bit_size;
|
||||
uint8_t mask_operand[16];
|
||||
uint8_t spec_operand[16];
|
||||
uint8_t description[64];
|
||||
enum bnxt_ulp_mapper_opc mask_opcode;
|
||||
enum bnxt_ulp_mapper_opc spec_opcode;
|
||||
uint16_t field_bit_size;
|
||||
uint8_t mask_operand[16];
|
||||
uint8_t spec_operand[16];
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_result_field_info {
|
||||
uint8_t description[64];
|
||||
enum bnxt_ulp_result_opc result_opcode;
|
||||
enum bnxt_ulp_mapper_opc result_opcode;
|
||||
uint16_t field_bit_size;
|
||||
uint8_t result_operand[16];
|
||||
};
|
||||
|
@ -403,9 +403,9 @@ ulp_blob_push_encap(struct ulp_blob *blob,
|
||||
*
|
||||
* datalen [in] The number of bits of pad to add
|
||||
*
|
||||
* returns the number of pad bits added, zero on failure
|
||||
* returns the number of pad bits added, -1 on failure
|
||||
*/
|
||||
uint32_t
|
||||
int32_t
|
||||
ulp_blob_pad_push(struct ulp_blob *blob,
|
||||
uint32_t datalen)
|
||||
{
|
||||
@ -494,6 +494,35 @@ ulp_blob_perform_encap_swap(struct ulp_blob *blob)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the blob buffer reversal byte wise.
|
||||
* This api makes the first byte the last and
|
||||
* vice-versa.
|
||||
*
|
||||
* blob [in] The blob's data to be used for swap.
|
||||
*
|
||||
* returns void.
|
||||
*/
|
||||
void
|
||||
ulp_blob_perform_byte_reverse(struct ulp_blob *blob)
|
||||
{
|
||||
uint32_t idx = 0, num = 0;
|
||||
uint8_t xchar;
|
||||
|
||||
/* validate the arguments */
|
||||
if (!blob) {
|
||||
BNXT_TF_DBG(ERR, "invalid argument\n");
|
||||
return; /* failure */
|
||||
}
|
||||
|
||||
num = ULP_BITS_2_BYTE_NR(blob->write_idx);
|
||||
for (idx = 0; idx < (num / 2); idx++) {
|
||||
xchar = blob->data[idx];
|
||||
blob->data[idx] = blob->data[(num - 1) - idx];
|
||||
blob->data[(num - 1) - idx] = xchar;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read data from the operand
|
||||
*
|
||||
|
@ -236,9 +236,9 @@ ulp_blob_data_get(struct ulp_blob *blob,
|
||||
*
|
||||
* datalen [in] The number of bits of pad to add
|
||||
*
|
||||
* returns the number of pad bits added, zero on failure
|
||||
* returns the number of pad bits added, -1 on failure
|
||||
*/
|
||||
uint32_t
|
||||
int32_t
|
||||
ulp_blob_pad_push(struct ulp_blob *blob,
|
||||
uint32_t datalen);
|
||||
|
||||
@ -263,6 +263,18 @@ ulp_blob_encap_swap_idx_set(struct ulp_blob *blob);
|
||||
void
|
||||
ulp_blob_perform_encap_swap(struct ulp_blob *blob);
|
||||
|
||||
/*
|
||||
* Perform the blob buffer reversal byte wise.
|
||||
* This api makes the first byte the last and
|
||||
* vice-versa.
|
||||
*
|
||||
* blob [in] The blob's data to be used for swap.
|
||||
*
|
||||
* returns void.
|
||||
*/
|
||||
void
|
||||
ulp_blob_perform_byte_reverse(struct ulp_blob *blob);
|
||||
|
||||
/*
|
||||
* Read data from the operand
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user