net/bnxt: add action SRAM translation
[dpdk.git] / drivers / net / bnxt / tf_core / tf_util.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014-2021 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _TF_UTIL_H_
7 #define _TF_UTIL_H_
8
9 #include "tf_core.h"
10 #include "tf_device.h"
11
12 /**
13  * Helper function converting direction to text string
14  *
15  * [in] dir
16  *   Receive or transmit direction identifier
17  *
18  * Returns:
19  *   Pointer to a char string holding the string for the direction
20  */
21 const char *tf_dir_2_str(enum tf_dir dir);
22
23 /**
24  * Helper function converting identifier to text string
25  *
26  * [in] id_type
27  *   Identifier type
28  *
29  * Returns:
30  *   Pointer to a char string holding the string for the identifier
31  */
32 const char *tf_ident_2_str(enum tf_identifier_type id_type);
33
34 /**
35  * Helper function converting tcam type to text string
36  *
37  * [in] tcam_type
38  *   TCAM type
39  *
40  * Returns:
41  *   Pointer to a char string holding the string for the tcam
42  */
43 const char *tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type);
44
45 /**
46  * Helper function converting tbl type to text string
47  *
48  * [in] tbl_type
49  *   Table type
50  *
51  * Returns:
52  *   Pointer to a char string holding the string for the table type
53  */
54 const char *tf_tbl_type_2_str(enum tf_tbl_type tbl_type);
55
56 /**
57  * Helper function converting em tbl type to text string
58  *
59  * [in] em_type
60  *   EM type
61  *
62  * Returns:
63  *   Pointer to a char string holding the string for the EM type
64  */
65 const char *tf_em_tbl_type_2_str(enum tf_em_tbl_type em_type);
66
67 /**
68  * Helper function converting module and submodule type to
69  * text string.
70  *
71  * [in] module
72  *   Module type
73  *
74  * [in] submodule
75  *   Module specific subtype
76  *
77  * Returns:
78  *   Pointer to a char string holding the string for the EM type
79  */
80 const char *tf_module_subtype_2_str(enum tf_module_type module,
81                                     uint16_t subtype);
82
83 /**
84  * Helper function converting module type to text string
85  *
86  * [in] module
87  *   Module type
88  *
89  * Returns:
90  *   Pointer to a char string holding the string for the EM type
91  */
92 const char *tf_module_2_str(enum tf_module_type module);
93
94 #endif /* _TF_UTIL_H_ */