Skip to content

Commit

Permalink
net/bnxt: update template files
Browse files Browse the repository at this point in the history
This patch updates template files for the changes being
being added in the next patch.

- add stats cache for thor2

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
Peter Spreadborough authored and ajitkhaparde committed Sep 20, 2024
1 parent 44d251d commit 6950147
Show file tree
Hide file tree
Showing 5 changed files with 9,420 additions and 8,951 deletions.
103 changes: 87 additions & 16 deletions drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#ifndef ULP_TEMPLATE_DB_H_
#define ULP_TEMPLATE_DB_H_

#define BNXT_ULP_REGFILE_MAX_SZ 102
#define BNXT_ULP_REGFILE_MAX_SZ 107
#define BNXT_ULP_MAX_NUM_DEVICES 5
#define BNXT_ULP_LOG2_MAX_NUM_DEV 2.32192809488736
#define BNXT_ULP_GEN_TBL_MAX_SZ 60
#define BNXT_ULP_GEN_TBL_MAX_SZ 62
#define BNXT_ULP_ALLOCATOR_TBL_MAX_SZ 2
#define BNXT_ULP_CLASS_MATCH_LIST_MAX_SZ 163
#define BNXT_ULP_ACT_MATCH_LIST_MAX_SZ 21
Expand All @@ -33,19 +33,19 @@
#define ULP_WH_PLUS_CLASS_COND_OPER_LIST_SIZE 0
#define ULP_THOR_CLASS_TMPL_LIST_SIZE 8
#define ULP_THOR_CLASS_TBL_LIST_SIZE 214
#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 936
#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 940
#define ULP_THOR_CLASS_KEY_EXT_LIST_SIZE 794
#define ULP_THOR_CLASS_IDENT_LIST_SIZE 67
#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1320
#define ULP_THOR_CLASS_COND_LIST_SIZE 4945
#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1322
#define ULP_THOR_CLASS_COND_LIST_SIZE 4947
#define ULP_THOR_CLASS_COND_OPER_LIST_SIZE 15
#define ULP_THOR2_CLASS_TMPL_LIST_SIZE 8
#define ULP_THOR2_CLASS_TBL_LIST_SIZE 182
#define ULP_THOR2_CLASS_KEY_INFO_LIST_SIZE 737
#define ULP_THOR2_CLASS_KEY_EXT_LIST_SIZE 660
#define ULP_THOR2_CLASS_IDENT_LIST_SIZE 61
#define ULP_THOR2_CLASS_RESULT_FIELD_LIST_SIZE 1603
#define ULP_THOR2_CLASS_COND_LIST_SIZE 4183
#define ULP_THOR2_CLASS_COND_LIST_SIZE 4184
#define ULP_THOR2_CLASS_COND_OPER_LIST_SIZE 14
#define ULP_WH_PLUS_ACT_TMPL_LIST_SIZE 13
#define ULP_WH_PLUS_ACT_TBL_LIST_SIZE 155
Expand All @@ -64,11 +64,11 @@
#define ULP_THOR_ACT_COND_LIST_SIZE 90
#define ULP_THOR_ACT_COND_OPER_LIST_SIZE 0
#define ULP_THOR2_ACT_TMPL_LIST_SIZE 13
#define ULP_THOR2_ACT_TBL_LIST_SIZE 115
#define ULP_THOR2_ACT_KEY_INFO_LIST_SIZE 85
#define ULP_THOR2_ACT_TBL_LIST_SIZE 121
#define ULP_THOR2_ACT_KEY_INFO_LIST_SIZE 86
#define ULP_THOR2_ACT_KEY_EXT_LIST_SIZE 5
#define ULP_THOR2_ACT_IDENT_LIST_SIZE 40
#define ULP_THOR2_ACT_RESULT_FIELD_LIST_SIZE 446
#define ULP_THOR2_ACT_IDENT_LIST_SIZE 42
#define ULP_THOR2_ACT_RESULT_FIELD_LIST_SIZE 452
#define ULP_THOR2_ACT_COND_LIST_SIZE 96
#define ULP_THOR2_ACT_COND_OPER_LIST_SIZE 0

Expand Down Expand Up @@ -542,7 +542,8 @@ enum bnxt_ulp_func_opc {
BNXT_ULP_FUNC_OPC_SUB = 25,
BNXT_ULP_FUNC_OPC_COND_LIST = 26,
BNXT_ULP_FUNC_OPC_PORT_TABLE = 27,
BNXT_ULP_FUNC_OPC_LAST = 28
BNXT_ULP_FUNC_OPC_MTR_ID_TO_STATS_HANDLE = 28,
BNXT_ULP_FUNC_OPC_LAST = 29
};

enum bnxt_ulp_func_src {
Expand Down Expand Up @@ -888,7 +889,18 @@ enum bnxt_ulp_rf_idx {
BNXT_ULP_RF_IDX_RID_1 = 99,
BNXT_ULP_RF_IDX_GROUP_MISS_ACT_PTR = 100,
BNXT_ULP_RF_IDX_GROUP_MISS_ACT_IS_SET = 101,
BNXT_ULP_RF_IDX_LAST = 102
BNXT_ULP_RF_IDX_DYN_UPAR_PTR_0 = 102,
BNXT_ULP_RF_IDX_CMM_STAT_HNDL_MTR = 103,
BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_MTR = 104,
BNXT_ULP_RF_IDX_SW_METER_PTR_0 = 105,
BNXT_ULP_RF_IDX_METER_STATS_HNDL_0 = 106,
BNXT_ULP_RF_IDX_LAST = 107
};

enum bnxt_ulp_stats_cache_tbl_opc {
BNXT_ULP_STATS_CACHE_TBL_OPC_NOT_USED = 0,
BNXT_ULP_STATS_CACHE_TBL_OPC_ALLOC_WR = 1,
BNXT_ULP_STATS_CACHE_TBL_OPC_LAST = 2
};

enum bnxt_ulp_tcam_tbl_opc {
Expand Down Expand Up @@ -960,7 +972,8 @@ enum bnxt_ulp_resource_func {
BNXT_ULP_RESOURCE_FUNC_VNIC_TABLE = 0x89,
BNXT_ULP_RESOURCE_FUNC_GLOBAL_REGISTER_TABLE = 0x8a,
BNXT_ULP_RESOURCE_FUNC_KEY_RECIPE_TABLE = 0x8b,
BNXT_ULP_RESOURCE_FUNC_ALLOCATOR_TABLE = 0x8c
BNXT_ULP_RESOURCE_FUNC_ALLOCATOR_TABLE = 0x8c,
BNXT_ULP_RESOURCE_FUNC_STATS_CACHE = 0x8d
};

enum bnxt_ulp_resource_sub_type {
Expand Down Expand Up @@ -1001,6 +1014,7 @@ enum bnxt_ulp_resource_sub_type {
BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_MULTI_FLOW_TUNNEL_CACHE = 27,
BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_PROF_FUNC_CACHE = 28,
BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_GROUP_MISS_ACTION_CACHE = 29,
BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE = 30,
BNXT_ULP_RESOURCE_SUB_TYPE_ALLOCATOR_TABLE_JUMP_INDEX = 0,
BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_RSS = 0,
BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_QUEUE = 1,
Expand Down Expand Up @@ -1501,7 +1515,26 @@ enum ulp_wp_sym {
ULP_WP_SYM_DPORT_TUN_TYPE_VXLAN_GPE = 3,
ULP_WP_SYM_DPORT_TUN_TYPE_ECPRI = 4,
ULP_WP_SYM_DPORT_TUN_TYPE_SRV6 = 5,
ULP_WP_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6
ULP_WP_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6,
ULP_WP_SYM_L3_ECPRI_HDR_SIZE = 0,
ULP_WP_SYM_L3_ECPRI_HDR_OFFS = 0,
ULP_WP_SYM_L3_ECPRI_PAT = 0,
ULP_WP_SYM_L3_ECPRI_SRC_SIZE = 0,
ULP_WP_SYM_L3_ECPRI_SRC_MASK = 0,
ULP_WP_SYM_L3_ECPRI_SRC_OFFS = 0,
ULP_WP_SYM_L3_ECPRI_DEST_SIZE = 0,
ULP_WP_SYM_L3_ECPRI_DEST_MASK = 0,
ULP_WP_SYM_L3_ECPRI_DEST_OFFS = 0,
ULP_WP_SYM_TUN_ECPRI_HDR_SIZE = 0,
ULP_WP_SYM_TUN_ECPRI_HDR_OFFS = 0,
ULP_WP_SYM_T_ECPRI_QOS_OFFS = 0,
ULP_WP_SYM_T_ECPRI_QOS_SLICE = 0,
ULP_WP_SYM_T_ECPRI_ID_SIZE = 0,
ULP_WP_SYM_T_ECPRI_ID_OFFS = 0,
ULP_WP_SYM_T_ECPRI_ID_MASK = 0,
ULP_WP_SYM_T_ECPRI_CONTEXT_SIZE = 0,
ULP_WP_SYM_T_ECPRI_CONTEXT_OFFS = 0,
ULP_WP_SYM_T_ECPRI_CONTEXT_MASK = 0
};

enum ulp_thor_sym {
Expand Down Expand Up @@ -1804,7 +1837,26 @@ enum ulp_thor_sym {
ULP_THOR_SYM_DPORT_TUN_TYPE_VXLAN_GPE = 3,
ULP_THOR_SYM_DPORT_TUN_TYPE_ECPRI = 4,
ULP_THOR_SYM_DPORT_TUN_TYPE_SRV6 = 5,
ULP_THOR_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6
ULP_THOR_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6,
ULP_THOR_SYM_L3_ECPRI_HDR_SIZE = 4,
ULP_THOR_SYM_L3_ECPRI_HDR_OFFS = 0,
ULP_THOR_SYM_L3_ECPRI_PAT = 0,
ULP_THOR_SYM_L3_ECPRI_SRC_SIZE = 32,
ULP_THOR_SYM_L3_ECPRI_SRC_MASK = 0,
ULP_THOR_SYM_L3_ECPRI_SRC_OFFS = 7,
ULP_THOR_SYM_L3_ECPRI_DEST_SIZE = 32,
ULP_THOR_SYM_L3_ECPRI_DEST_MASK = 0,
ULP_THOR_SYM_L3_ECPRI_DEST_OFFS = 3,
ULP_THOR_SYM_TUN_ECPRI_HDR_SIZE = 4,
ULP_THOR_SYM_TUN_ECPRI_HDR_OFFS = 0,
ULP_THOR_SYM_T_ECPRI_QOS_OFFS = 0,
ULP_THOR_SYM_T_ECPRI_QOS_SLICE = 3,
ULP_THOR_SYM_T_ECPRI_ID_SIZE = 32,
ULP_THOR_SYM_T_ECPRI_ID_OFFS = 7,
ULP_THOR_SYM_T_ECPRI_ID_MASK = 0xffffffff,
ULP_THOR_SYM_T_ECPRI_CONTEXT_SIZE = 32,
ULP_THOR_SYM_T_ECPRI_CONTEXT_OFFS = 3,
ULP_THOR_SYM_T_ECPRI_CONTEXT_MASK = 0xffffffff
};

enum ulp_thor2_sym {
Expand Down Expand Up @@ -2107,7 +2159,26 @@ enum ulp_thor2_sym {
ULP_THOR2_SYM_DPORT_TUN_TYPE_VXLAN_GPE = 3,
ULP_THOR2_SYM_DPORT_TUN_TYPE_ECPRI = 4,
ULP_THOR2_SYM_DPORT_TUN_TYPE_SRV6 = 5,
ULP_THOR2_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6
ULP_THOR2_SYM_DPORT_TUN_TYPE_VXLAN_IPV4 = 6,
ULP_THOR2_SYM_L3_ECPRI_HDR_SIZE = 0,
ULP_THOR2_SYM_L3_ECPRI_HDR_OFFS = 0,
ULP_THOR2_SYM_L3_ECPRI_PAT = 0,
ULP_THOR2_SYM_L3_ECPRI_SRC_SIZE = 0,
ULP_THOR2_SYM_L3_ECPRI_SRC_MASK = 0,
ULP_THOR2_SYM_L3_ECPRI_SRC_OFFS = 0,
ULP_THOR2_SYM_L3_ECPRI_DEST_SIZE = 0,
ULP_THOR2_SYM_L3_ECPRI_DEST_MASK = 0,
ULP_THOR2_SYM_L3_ECPRI_DEST_OFFS = 0,
ULP_THOR2_SYM_TUN_ECPRI_HDR_SIZE = 0,
ULP_THOR2_SYM_TUN_ECPRI_HDR_OFFS = 0,
ULP_THOR2_SYM_T_ECPRI_QOS_OFFS = 0,
ULP_THOR2_SYM_T_ECPRI_QOS_SLICE = 0,
ULP_THOR2_SYM_T_ECPRI_ID_SIZE = 0,
ULP_THOR2_SYM_T_ECPRI_ID_OFFS = 0,
ULP_THOR2_SYM_T_ECPRI_ID_MASK = 0,
ULP_THOR2_SYM_T_ECPRI_CONTEXT_SIZE = 0,
ULP_THOR2_SYM_T_ECPRI_CONTEXT_OFFS = 0,
ULP_THOR2_SYM_T_ECPRI_CONTEXT_MASK = 0
};

enum bnxt_ulp_df_tpl {
Expand Down
80 changes: 76 additions & 4 deletions drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,30 @@ const struct bnxt_ulp_generic_tbl_params ulp_wh_plus_generic_tbl_params[] = {
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_INGRESS] = {
.name = "INGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_KEY_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_EGRESS] = {
.name = "EGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_KEY_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
}
};

Expand Down Expand Up @@ -1361,8 +1385,8 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor_generic_tbl_params[] = {
.name = "INGRESS GENERIC_TABLE_TUNNEL_GPARSE_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
.result_num_entries = 64,
.result_num_bytes = 10,
.key_num_bytes = 1,
.result_num_bytes = 11,
.key_num_bytes = 2,
.partial_key_num_bytes = 0,
.num_buckets = 4,
.hash_tbl_entries = 256,
Expand Down Expand Up @@ -1451,6 +1475,30 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor_generic_tbl_params[] = {
.num_buckets = 4,
.hash_tbl_entries = 512,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_INGRESS] = {
.name = "INGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_KEY_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_EGRESS] = {
.name = "EGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_KEY_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
}
};

Expand Down Expand Up @@ -1748,7 +1796,7 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor2_generic_tbl_params[] = {
.name = "INGRESS GENERIC_TABLE_SHARED_METER_TBL_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
.result_num_entries = 1024,
.result_num_bytes = 10,
.result_num_bytes = 18,
.key_num_bytes = 4,
.partial_key_num_bytes = 0,
.num_buckets = 8,
Expand Down Expand Up @@ -2174,6 +2222,30 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor2_generic_tbl_params[] = {
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_INGRESS] = {
.name = "INGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
},
[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_SHARED_METER_STATS_CACHE << 1 |
BNXT_ULP_DIRECTION_EGRESS] = {
.name = "EGRESS GENERIC_TABLE_SHARED_METER_STATS_CACHE",
.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
.result_num_entries = 0,
.result_num_bytes = 0,
.key_num_bytes = 0,
.partial_key_num_bytes = 0,
.num_buckets = 0,
.hash_tbl_entries = 0,
.result_byte_order = BNXT_ULP_BYTE_ORDER_LE,
}
};

Expand Down Expand Up @@ -2523,7 +2595,7 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
.default_priority = 0,
.max_def_priority = 0,
.min_flow_priority = 0,
.max_flow_priority = 255,
.max_flow_priority = 65535,
.vxlan_port = 0,
.vxlan_ip_port = 0,
.max_pools = 1,
Expand Down
Loading

0 comments on commit 6950147

Please sign in to comment.