From ce836c07e5322bb7967c6de204568a1c143b1391 Mon Sep 17 00:00:00 2001 From: Kishore Padmanabha Date: Thu, 10 Sep 2020 18:55:53 -0700 Subject: [PATCH] net/bnxt: remove VLAN pop action for egress flows 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 Reviewed-by: Mike Baucom Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 42 +++++-------------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 +- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c index 22142c1377..de96afe8cf 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c @@ -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, diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h index 51758868a2..4c1161acd2 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h @@ -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 { -- 2.20.1