1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2019 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:
28 return "l2_ctxt_remap";
29 case TF_IDENT_TYPE_PROF_FUNC:
31 case TF_IDENT_TYPE_WC_PROF:
33 case TF_IDENT_TYPE_EM_PROF:
35 case TF_IDENT_TYPE_L2_FUNC:
38 return "Invalid identifier";
43 *tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type)
46 case TF_TCAM_TBL_TYPE_L2_CTXT_TCAM:
47 return "l2_ctxt_tcam";
48 case TF_TCAM_TBL_TYPE_PROF_TCAM:
50 case TF_TCAM_TBL_TYPE_WC_TCAM:
52 case TF_TCAM_TBL_TYPE_VEB_TCAM:
54 case TF_TCAM_TBL_TYPE_SP_TCAM:
56 case TF_TCAM_TBL_TYPE_CT_RULE_TCAM:
57 return "ct_rule_tcam";
59 return "Invalid tcam table type";
64 *tf_tbl_type_2_str(enum tf_tbl_type tbl_type)
67 case TF_TBL_TYPE_FULL_ACT_RECORD:
68 return "Full Action record";
69 case TF_TBL_TYPE_MCAST_GROUPS:
70 return "Multicast Groups";
71 case TF_TBL_TYPE_ACT_ENCAP_8B:
73 case TF_TBL_TYPE_ACT_ENCAP_16B:
75 case TF_TBL_TYPE_ACT_ENCAP_32B:
77 case TF_TBL_TYPE_ACT_ENCAP_64B:
79 case TF_TBL_TYPE_ACT_SP_SMAC:
80 return "Source Properties SMAC";
81 case TF_TBL_TYPE_ACT_SP_SMAC_IPV4:
82 return "Source Properties SMAC IPv4";
83 case TF_TBL_TYPE_ACT_SP_SMAC_IPV6:
84 return "Source Properties SMAC IPv6";
85 case TF_TBL_TYPE_ACT_STATS_64:
87 case TF_TBL_TYPE_ACT_MODIFY_SPORT:
88 return "NAT Source Port";
89 case TF_TBL_TYPE_ACT_MODIFY_DPORT:
90 return "NAT Destination Port";
91 case TF_TBL_TYPE_ACT_MODIFY_IPV4_SRC:
92 return "NAT IPv4 Source";
93 case TF_TBL_TYPE_ACT_MODIFY_IPV4_DEST:
94 return "NAT IPv4 Destination";
95 case TF_TBL_TYPE_ACT_MODIFY_IPV6_SRC:
96 return "NAT IPv6 Source";
97 case TF_TBL_TYPE_ACT_MODIFY_IPV6_DEST:
98 return "NAT IPv6 Destination";
99 case TF_TBL_TYPE_METER_PROF:
100 return "Meter Profile";
101 case TF_TBL_TYPE_METER_INST:
103 case TF_TBL_TYPE_MIRROR_CONFIG:
105 case TF_TBL_TYPE_UPAR:
107 case TF_TBL_TYPE_EPOCH0:
109 case TF_TBL_TYPE_EPOCH1:
111 case TF_TBL_TYPE_METADATA:
113 case TF_TBL_TYPE_CT_STATE:
114 return "Connection State";
115 case TF_TBL_TYPE_RANGE_PROF:
116 return "Range Profile";
117 case TF_TBL_TYPE_RANGE_ENTRY:
119 case TF_TBL_TYPE_LAG:
120 return "Link Aggregation";
121 case TF_TBL_TYPE_VNIC_SVIF:
123 case TF_TBL_TYPE_EM_FKB:
124 return "EM Flexible Key Builder";
125 case TF_TBL_TYPE_WC_FKB:
126 return "WC Flexible Key Builder";
127 case TF_TBL_TYPE_EXT:
130 return "Invalid tbl type";
135 *tf_em_tbl_type_2_str(enum tf_em_tbl_type em_type)
138 case TF_EM_TBL_TYPE_EM_RECORD:
140 case TF_EM_TBL_TYPE_TBL_SCOPE:
141 return "Table Scope";
143 return "Invalid EM type";