1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2021 Broadcom
11 tf_dir_2_str(enum tf_dir dir)
19 return "Invalid direction";
24 tf_ident_2_str(enum tf_identifier_type id_type)
27 case TF_IDENT_TYPE_L2_CTXT_HIGH:
28 return "l2_ctxt_remap_high";
29 case TF_IDENT_TYPE_L2_CTXT_LOW:
30 return "l2_ctxt_remap_low";
31 case TF_IDENT_TYPE_PROF_FUNC:
33 case TF_IDENT_TYPE_WC_PROF:
35 case TF_IDENT_TYPE_EM_PROF:
37 case TF_IDENT_TYPE_L2_FUNC:
40 return "Invalid identifier";
45 tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type)
48 case TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH:
49 return "l2_ctxt_tcam_high";
50 case TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW:
51 return "l2_ctxt_tcam_low";
52 case TF_TCAM_TBL_TYPE_PROF_TCAM:
54 case TF_TCAM_TBL_TYPE_WC_TCAM:
56 case TF_TCAM_TBL_TYPE_VEB_TCAM:
58 case TF_TCAM_TBL_TYPE_SP_TCAM:
60 case TF_TCAM_TBL_TYPE_CT_RULE_TCAM:
61 return "ct_rule_tcam";
63 case TF_TCAM_TBL_TYPE_WC_TCAM_HIGH:
65 case TF_TCAM_TBL_TYPE_WC_TCAM_LOW:
69 return "Invalid tcam table type";
74 tf_tbl_type_2_str(enum tf_tbl_type tbl_type)
77 case TF_TBL_TYPE_FULL_ACT_RECORD:
78 return "Full Action record";
79 case TF_TBL_TYPE_COMPACT_ACT_RECORD:
80 return "Compact Action record";
81 case TF_TBL_TYPE_MCAST_GROUPS:
82 return "Multicast Groups";
83 case TF_TBL_TYPE_ACT_ENCAP_8B:
85 case TF_TBL_TYPE_ACT_ENCAP_16B:
87 case TF_TBL_TYPE_ACT_ENCAP_32B:
89 case TF_TBL_TYPE_ACT_ENCAP_64B:
91 case TF_TBL_TYPE_ACT_SP_SMAC:
92 return "Source Properties SMAC";
93 case TF_TBL_TYPE_ACT_SP_SMAC_IPV4:
94 return "Source Properties SMAC IPv4";
95 case TF_TBL_TYPE_ACT_SP_SMAC_IPV6:
96 return "Source Properties SMAC IPv6";
97 case TF_TBL_TYPE_ACT_STATS_64:
99 case TF_TBL_TYPE_ACT_MODIFY_IPV4:
100 return "Modify IPv4";
101 case TF_TBL_TYPE_ACT_MODIFY_8B:
103 case TF_TBL_TYPE_ACT_MODIFY_16B:
105 case TF_TBL_TYPE_ACT_MODIFY_32B:
107 case TF_TBL_TYPE_ACT_MODIFY_64B:
109 case TF_TBL_TYPE_METER_PROF:
110 return "Meter Profile";
111 case TF_TBL_TYPE_METER_INST:
113 case TF_TBL_TYPE_MIRROR_CONFIG:
115 case TF_TBL_TYPE_UPAR:
117 case TF_TBL_TYPE_METADATA:
119 case TF_TBL_TYPE_EM_FKB:
120 return "EM Flexible Key Builder";
121 case TF_TBL_TYPE_WC_FKB:
122 return "WC Flexible Key Builder";
123 case TF_TBL_TYPE_EXT:
125 case TF_TBL_TYPE_METER_DROP_CNT:
126 return "Meter drop counter";
128 return "Invalid tbl type";
133 tf_em_tbl_type_2_str(enum tf_em_tbl_type em_type)
136 case TF_EM_TBL_TYPE_EM_RECORD:
138 case TF_EM_TBL_TYPE_TBL_SCOPE:
139 return "Table Scope";
141 return "Invalid EM type";
146 tf_module_subtype_2_str(enum tf_module_type module,
150 case TF_MODULE_TYPE_IDENTIFIER:
151 return tf_ident_2_str(subtype);
152 case TF_MODULE_TYPE_TABLE:
153 return tf_tbl_type_2_str(subtype);
154 case TF_MODULE_TYPE_TCAM:
155 return tf_tcam_tbl_2_str(subtype);
156 case TF_MODULE_TYPE_EM:
157 return tf_em_tbl_type_2_str(subtype);
159 return "Invalid Module type";
164 tf_module_2_str(enum tf_module_type module)
167 case TF_MODULE_TYPE_IDENTIFIER:
169 case TF_MODULE_TYPE_TABLE:
171 case TF_MODULE_TYPE_TCAM:
173 case TF_MODULE_TYPE_EM:
176 return "Invalid Device Module type";