net/bnxt: remove VLAN pop action for egress flows
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Fri, 11 Sep 2020 01:55:53 +0000 (18:55 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:11 +0000 (18:55 +0200)
Whitney platform does not support VLAN pop action in the egress
direction. Hence the VLAN pop action is removed from the egress
action templates.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h

index 22142c1..de96afe 100644 (file)
@@ -1036,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = {
        },
        {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
-       .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6,
+       .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
        .resource_sub_type =
                BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL,
        .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
@@ -1434,21 +1434,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
        },
        {
        .field_bit_size = 4,
-       .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST,
-       .result_operand = {
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 56) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 48) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 40) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 32) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 24) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 16) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 8) & 0xff,
-               (uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN & 0xff,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-       .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-       .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+       .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
+       .result_operand = {
+               BNXT_ULP_SYM_DECAP_FUNC_THRU_L2,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
        },
        {
        .field_bit_size = 12,
@@ -2346,21 +2336,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
        },
        {
        .field_bit_size = 4,
-       .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST,
-       .result_operand = {
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 56) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 48) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 40) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 32) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 24) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 16) & 0xff,
-               ((uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN >> 8) & 0xff,
-               (uint64_t)BNXT_ULP_HDR_BIT_T_VXLAN & 0xff,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-       .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-       .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
-               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+       .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT,
+       .result_operand = {
+               BNXT_ULP_SYM_DECAP_FUNC_THRU_L2,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
        },
        {
        .field_bit_size = 12,
index 5175886..4c1161a 100644 (file)
@@ -218,8 +218,7 @@ enum bnxt_ulp_mapper_opc {
        BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_ACT_PROP_ELSE_CONST = 9,
        BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_CONST_ELSE_CONST = 10,
        BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF = 11,
-       BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST = 12,
-       BNXT_ULP_MAPPER_OPC_LAST = 13
+       BNXT_ULP_MAPPER_OPC_LAST = 12
 };
 
 enum bnxt_ulp_mark_db_opcode {