net/bnxt: add a failure log
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_template_db_tbl.c
index 4388a0a..c5f340d 100644 (file)
@@ -7,6 +7,7 @@
 #include "ulp_template_db_field.h"
 #include "ulp_template_struct.h"
 #include "ulp_rte_parser.h"
+#include "ulp_template_db_tbl.h"
 
 uint32_t ulp_act_prop_map_table[] = {
        [BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN_SZ] =
@@ -89,6 +90,8 @@ uint32_t ulp_act_prop_map_table[] = {
                BNXT_ULP_ACT_PROP_SZ_ENCAP_UDP,
        [BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN] =
                BNXT_ULP_ACT_PROP_SZ_ENCAP_TUN,
+       [BNXT_ULP_ACT_PROP_IDX_JUMP] =
+               BNXT_ULP_ACT_PROP_SZ_JUMP,
        [BNXT_ULP_ACT_PROP_IDX_LAST] =
                BNXT_ULP_ACT_PROP_SZ_LAST
 };
@@ -107,8 +110,8 @@ struct bnxt_ulp_rte_act_info ulp_act_info[] = {
        .proto_act_func          = NULL
        },
        [RTE_FLOW_ACTION_TYPE_JUMP] = {
-       .act_type                = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,
-       .proto_act_func          = NULL
+       .act_type                = BNXT_ULP_ACT_TYPE_SUPPORTED,
+       .proto_act_func          = ulp_rte_jump_act_handler
        },
        [RTE_FLOW_ACTION_TYPE_MARK] = {
        .act_type                = BNXT_ULP_ACT_TYPE_SUPPORTED,
@@ -259,8 +262,8 @@ struct bnxt_ulp_rte_act_info ulp_act_info[] = {
        .proto_act_func          = NULL
        },
        [RTE_FLOW_ACTION_TYPE_DEC_TTL] = {
-               .act_type                = BNXT_ULP_ACT_TYPE_SUPPORTED,
-               .proto_act_func          = ulp_rte_dec_ttl_act_handler
+       .act_type                = BNXT_ULP_ACT_TYPE_SUPPORTED,
+       .proto_act_func          = ulp_rte_dec_ttl_act_handler
        },
        [RTE_FLOW_ACTION_TYPE_SET_TTL] = {
        .act_type                = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,
@@ -311,22 +314,72 @@ struct bnxt_ulp_cache_tbl_params ulp_cache_tbl_params[] = {
        }
 };
 
+const struct ulp_template_device_tbls ulp_template_stingray_tbls[] = {
+       [BNXT_ULP_TEMPLATE_TYPE_CLASS] = {
+       .tmpl_list               = ulp_stingray_class_tmpl_list,
+       .tbl_list                = ulp_stingray_class_tbl_list,
+       .key_field_list          = ulp_stingray_class_key_field_list,
+       .result_field_list       = ulp_stingray_class_result_field_list,
+       .ident_list              = ulp_stingray_class_ident_list
+       },
+       [BNXT_ULP_TEMPLATE_TYPE_ACTION] = {
+       .tmpl_list               = ulp_stingray_act_tmpl_list,
+       .tbl_list                = ulp_stingray_act_tbl_list,
+       .result_field_list       = ulp_stingray_act_result_field_list
+       }
+};
+
+const struct ulp_template_device_tbls ulp_template_wh_plus_tbls[] = {
+       [BNXT_ULP_TEMPLATE_TYPE_CLASS] = {
+       .tmpl_list               = ulp_wh_plus_class_tmpl_list,
+       .tbl_list                = ulp_wh_plus_class_tbl_list,
+       .key_field_list          = ulp_wh_plus_class_key_field_list,
+       .result_field_list       = ulp_wh_plus_class_result_field_list,
+       .ident_list              = ulp_wh_plus_class_ident_list
+       },
+       [BNXT_ULP_TEMPLATE_TYPE_ACTION] = {
+       .tmpl_list               = ulp_wh_plus_act_tmpl_list,
+       .tbl_list                = ulp_wh_plus_act_tbl_list,
+       .result_field_list       = ulp_wh_plus_act_result_field_list
+       }
+};
+
 struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
        [BNXT_ULP_DEVICE_ID_WH_PLUS] = {
-       .flow_mem_type           = BNXT_ULP_FLOW_MEM_TYPE_INT,
        .byte_order              = BNXT_ULP_BYTE_ORDER_LE,
        .encap_byte_swap         = 1,
-       .flow_db_num_entries     = 16384,
+       .int_flow_db_num_entries = 16384,
+       .ext_flow_db_num_entries = 32768,
+       .mark_db_lfid_entries    = 65536,
+       .mark_db_gfid_entries    = 65536,
+       .flow_count_db_entries   = 16384,
+       .fdb_parent_flow_entries = 2,
+       .num_resources_per_flow  = 8,
+       .num_phy_ports           = 2,
+       .ext_cntr_table_type     = 0,
+       .byte_count_mask         = 0x0000000fffffffff,
+       .packet_count_mask       = 0xffffffff00000000,
+       .byte_count_shift        = 0,
+       .packet_count_shift      = 36,
+       .dev_tbls                = ulp_template_wh_plus_tbls
+       },
+       [BNXT_ULP_DEVICE_ID_STINGRAY] = {
+       .byte_order              = BNXT_ULP_BYTE_ORDER_LE,
+       .encap_byte_swap         = 1,
+       .int_flow_db_num_entries = 16384,
+       .ext_flow_db_num_entries = 32768,
        .mark_db_lfid_entries    = 65536,
-       .mark_db_gfid_entries    = 0,
+       .mark_db_gfid_entries    = 65536,
        .flow_count_db_entries   = 16384,
+       .fdb_parent_flow_entries = 2,
        .num_resources_per_flow  = 8,
        .num_phy_ports           = 2,
        .ext_cntr_table_type     = 0,
        .byte_count_mask         = 0x0000000fffffffff,
        .packet_count_mask       = 0xffffffff00000000,
        .byte_count_shift        = 0,
-       .packet_count_shift      = 36
+       .packet_count_shift      = 36,
+       .dev_tbls                = ulp_template_stingray_tbls
        }
 };
 
@@ -364,7 +417,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        [5] = {
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
-       .glb_regfile_index = BNXT_ULP_GLB_REGFILE_INDEX_VXLAN_PROF_FUNC_ID,
+       .glb_regfile_index       = BNXT_ULP_GLB_REGFILE_INDEX_VXLAN_PROF_FUNC_ID,
        .direction               = TF_DIR_RX
        },
        [6] = {
@@ -585,3 +638,4 @@ uint32_t bnxt_ulp_encap_vtag_map[] = {
 uint32_t ulp_glb_template_tbl[] = {
        BNXT_ULP_DF_TPL_LOOPBACK_ACTION_REC
 };
+