Added include/linux/dcbnl.h
[~tnikolova/compat/.git] / include / linux / dcbnl.h
1 #ifndef LINUX_DCBNL_H
2 #define LINUX_DCBNL_H
3
4 #include "../../compat/config.h"
5
6 #include_next <linux/dcbnl.h>
7
8 #ifndef HAVE_IEEE_GETQCN
9
10 #ifndef HAVE_STRUCT_IEEE_QCN
11 enum dcbnl_cndd_states {
12         DCB_CNDD_RESET = 0,
13         DCB_CNDD_EDGE,
14         DCB_CNDD_INTERIOR,
15         DCB_CNDD_INTERIOR_READY,
16 };
17
18 struct ieee_qcn {
19         __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
20         __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
21         __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
22         __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
23         __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
24         __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
25         __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
26         __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
27         __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
28         __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
29         __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
30         __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
31 };
32 #endif /* HAVE_STRUCT_IEEE_QCN */
33
34 /* RH7.3 backported this struct, but it does not have
35  * all needed feilds as below
36  * */
37 #define ieee_qcn_stats mlnx_ofed_ieee_qcn_stats
38 struct ieee_qcn_stats {
39         __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
40         __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
41         __u32 ignored_cnm[IEEE_8021QAZ_MAX_TCS];
42         __u32 estimated_total_rate[IEEE_8021QAZ_MAX_TCS];
43         __u32 cnms_handled_successfully[IEEE_8021QAZ_MAX_TCS];
44         __u32 min_total_limiters_rate[IEEE_8021QAZ_MAX_TCS];
45         __u32 max_total_limiters_rate[IEEE_8021QAZ_MAX_TCS];
46 };
47
48 #endif
49
50 #endif /* LINUX_DCBNL_H */