1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2021 Broadcom
10 #include "tf_device.h"
12 #define TF_BITS2BYTES(x) (((x) + 7) >> 3)
13 #define TF_BITS2BYTES_WORD_ALIGN(x) ((((x) + 31) >> 5) * 4)
14 #define TF_BITS2BYTES_64B_WORD_ALIGN(x) ((((x) + 63) >> 6) * 8)
17 * Helper function converting direction to text string
20 * Receive or transmit direction identifier
23 * Pointer to a char string holding the string for the direction
25 const char *tf_dir_2_str(enum tf_dir dir);
28 * Helper function converting identifier to text string
34 * Pointer to a char string holding the string for the identifier
36 const char *tf_ident_2_str(enum tf_identifier_type id_type);
39 * Helper function converting tcam type to text string
45 * Pointer to a char string holding the string for the tcam
47 const char *tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type);
50 * Helper function converting tbl type to text string
56 * Pointer to a char string holding the string for the table type
58 const char *tf_tbl_type_2_str(enum tf_tbl_type tbl_type);
61 * Helper function converting em tbl type to text string
67 * Pointer to a char string holding the string for the EM type
69 const char *tf_em_tbl_type_2_str(enum tf_em_tbl_type em_type);
72 * Helper function converting module and submodule type to
79 * Module specific subtype
82 * Pointer to a char string holding the string for the EM type
84 const char *tf_module_subtype_2_str(enum tf_module_type module,
88 * Helper function converting module type to text string
94 * Pointer to a char string holding the string for the EM type
96 const char *tf_module_2_str(enum tf_module_type module);
98 #endif /* _TF_UTIL_H_ */