net/bnxt: configure PARIF for egress rules
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_template_db_class.c
index 9de45cd..330c5ec 100644 (file)
@@ -5058,7 +5058,9 @@ struct bnxt_ulp_mapper_class_key_field_info ulp_class_key_field_list[] = {
        },
        {
        .field_bit_size = 2,
-       .mask_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
+       .mask_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
+       .mask_operand = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+               0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
        .spec_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
        .spec_operand = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
@@ -5149,7 +5151,9 @@ struct bnxt_ulp_mapper_class_key_field_info ulp_class_key_field_list[] = {
        },
        {
        .field_bit_size = 2,
-       .mask_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO,
+       .mask_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
+       .mask_operand = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+               0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
        .spec_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
        .spec_operand = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
@@ -17054,11 +17058,22 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
        },
        {
        .field_bit_size = 4,
-       .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
+       .result_opcode = BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF,
        .result_operand = {
-               BNXT_ULP_SYM_VF_FUNC_PARIF,
+               (BNXT_ULP_CF_IDX_MATCH_PORT_IS_VFREP >> 8) & 0xff,
+               BNXT_ULP_CF_IDX_MATCH_PORT_IS_VFREP & 0xff,
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+       .result_operand_true = {
+               (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
+               BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+       .result_operand_false = {
+               (BNXT_ULP_CF_IDX_DRV_FUNC_PARIF >> 8) & 0xff,
+               BNXT_ULP_CF_IDX_DRV_FUNC_PARIF & 0xff,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
        },
        {
        .field_bit_size = 8,