1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2021 Broadcom
11 #define TF_BITS2BYTES(x) (((x) + 7) >> 3)
12 #define TF_BITS2BYTES_WORD_ALIGN(x) ((((x) + 31) >> 5) * 4)
13 #define TF_BITS2BYTES_64B_WORD_ALIGN(x) ((((x) + 63) >> 6) * 8)
16 * Helper function converting direction to text string
19 * Receive or transmit direction identifier
22 * Pointer to a char string holding the string for the direction
24 const char *tf_dir_2_str(enum tf_dir dir);
27 * Helper function converting identifier to text string
33 * Pointer to a char string holding the string for the identifier
35 const char *tf_ident_2_str(enum tf_identifier_type id_type);
38 * Helper function converting tcam type to text string
44 * Pointer to a char string holding the string for the tcam
46 const char *tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type);
49 * Helper function converting tbl type to text string
55 * Pointer to a char string holding the string for the table type
57 const char *tf_tbl_type_2_str(enum tf_tbl_type tbl_type);
60 * Helper function converting em tbl type to text string
66 * Pointer to a char string holding the string for the EM type
68 const char *tf_em_tbl_type_2_str(enum tf_em_tbl_type em_type);
71 * Helper function converting module and submodule type to
78 * Module specific subtype
81 * Pointer to a char string holding the string for the EM type
83 const char *tf_module_subtype_2_str(enum tf_module_type module,
87 * Helper function converting module type to text string
93 * Pointer to a char string holding the string for the EM type
95 const char *tf_module_2_str(enum tf_module_type module);
97 #endif /* _TF_UTIL_H_ */