• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __LINUX_DCBNL_H__
20 #define __LINUX_DCBNL_H__
21 #include <linux/types.h>
22 #define IEEE_8021QAZ_MAX_TCS 8
23 #define IEEE_8021QAZ_TSA_STRICT 0
24 #define IEEE_8021QAZ_TSA_CB_SHAPER 1
25 #define IEEE_8021QAZ_TSA_ETS 2
26 #define IEEE_8021QAZ_TSA_VENDOR 255
27 struct ieee_ets {
28   __u8 willing;
29   __u8 ets_cap;
30   __u8 cbs;
31   __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
32   __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
33   __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
34   __u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
35   __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
36   __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
37   __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
38 };
39 struct ieee_maxrate {
40   __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS];
41 };
42 enum dcbnl_cndd_states {
43   DCB_CNDD_RESET = 0,
44   DCB_CNDD_EDGE,
45   DCB_CNDD_INTERIOR,
46   DCB_CNDD_INTERIOR_READY,
47 };
48 struct ieee_qcn {
49   __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
50   __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
51   __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
52   __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
53   __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
54   __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
55   __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
56   __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
57   __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
58   __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
59   __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
60   __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
61 };
62 struct ieee_qcn_stats {
63   __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
64   __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
65 };
66 struct ieee_pfc {
67   __u8 pfc_cap;
68   __u8 pfc_en;
69   __u8 mbc;
70   __u16 delay;
71   __u64 requests[IEEE_8021QAZ_MAX_TCS];
72   __u64 indications[IEEE_8021QAZ_MAX_TCS];
73 };
74 #define IEEE_8021Q_MAX_PRIORITIES 8
75 #define DCBX_MAX_BUFFERS 8
76 struct dcbnl_buffer {
77   __u8 prio2buffer[IEEE_8021Q_MAX_PRIORITIES];
78   __u32 buffer_size[DCBX_MAX_BUFFERS];
79   __u32 total_size;
80 };
81 #define CEE_DCBX_MAX_PGS 8
82 #define CEE_DCBX_MAX_PRIO 8
83 struct cee_pg {
84   __u8 willing;
85   __u8 error;
86   __u8 pg_en;
87   __u8 tcs_supported;
88   __u8 pg_bw[CEE_DCBX_MAX_PGS];
89   __u8 prio_pg[CEE_DCBX_MAX_PGS];
90 };
91 struct cee_pfc {
92   __u8 willing;
93   __u8 error;
94   __u8 pfc_en;
95   __u8 tcs_supported;
96 };
97 #define IEEE_8021QAZ_APP_SEL_ETHERTYPE 1
98 #define IEEE_8021QAZ_APP_SEL_STREAM 2
99 #define IEEE_8021QAZ_APP_SEL_DGRAM 3
100 #define IEEE_8021QAZ_APP_SEL_ANY 4
101 #define IEEE_8021QAZ_APP_SEL_DSCP 5
102 struct dcb_app {
103   __u8 selector;
104   __u8 priority;
105   __u16 protocol;
106 };
107 struct dcb_peer_app_info {
108   __u8 willing;
109   __u8 error;
110 };
111 struct dcbmsg {
112   __u8 dcb_family;
113   __u8 cmd;
114   __u16 dcb_pad;
115 };
116 enum dcbnl_commands {
117   DCB_CMD_UNDEFINED,
118   DCB_CMD_GSTATE,
119   DCB_CMD_SSTATE,
120   DCB_CMD_PGTX_GCFG,
121   DCB_CMD_PGTX_SCFG,
122   DCB_CMD_PGRX_GCFG,
123   DCB_CMD_PGRX_SCFG,
124   DCB_CMD_PFC_GCFG,
125   DCB_CMD_PFC_SCFG,
126   DCB_CMD_SET_ALL,
127   DCB_CMD_GPERM_HWADDR,
128   DCB_CMD_GCAP,
129   DCB_CMD_GNUMTCS,
130   DCB_CMD_SNUMTCS,
131   DCB_CMD_PFC_GSTATE,
132   DCB_CMD_PFC_SSTATE,
133   DCB_CMD_BCN_GCFG,
134   DCB_CMD_BCN_SCFG,
135   DCB_CMD_GAPP,
136   DCB_CMD_SAPP,
137   DCB_CMD_IEEE_SET,
138   DCB_CMD_IEEE_GET,
139   DCB_CMD_GDCBX,
140   DCB_CMD_SDCBX,
141   DCB_CMD_GFEATCFG,
142   DCB_CMD_SFEATCFG,
143   DCB_CMD_CEE_GET,
144   DCB_CMD_IEEE_DEL,
145   __DCB_CMD_ENUM_MAX,
146   DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
147 };
148 enum dcbnl_attrs {
149   DCB_ATTR_UNDEFINED,
150   DCB_ATTR_IFNAME,
151   DCB_ATTR_STATE,
152   DCB_ATTR_PFC_STATE,
153   DCB_ATTR_PFC_CFG,
154   DCB_ATTR_NUM_TC,
155   DCB_ATTR_PG_CFG,
156   DCB_ATTR_SET_ALL,
157   DCB_ATTR_PERM_HWADDR,
158   DCB_ATTR_CAP,
159   DCB_ATTR_NUMTCS,
160   DCB_ATTR_BCN,
161   DCB_ATTR_APP,
162   DCB_ATTR_IEEE,
163   DCB_ATTR_DCBX,
164   DCB_ATTR_FEATCFG,
165   DCB_ATTR_CEE,
166   __DCB_ATTR_ENUM_MAX,
167   DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
168 };
169 enum ieee_attrs {
170   DCB_ATTR_IEEE_UNSPEC,
171   DCB_ATTR_IEEE_ETS,
172   DCB_ATTR_IEEE_PFC,
173   DCB_ATTR_IEEE_APP_TABLE,
174   DCB_ATTR_IEEE_PEER_ETS,
175   DCB_ATTR_IEEE_PEER_PFC,
176   DCB_ATTR_IEEE_PEER_APP,
177   DCB_ATTR_IEEE_MAXRATE,
178   DCB_ATTR_IEEE_QCN,
179   DCB_ATTR_IEEE_QCN_STATS,
180   DCB_ATTR_DCB_BUFFER,
181   __DCB_ATTR_IEEE_MAX
182 };
183 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
184 enum ieee_attrs_app {
185   DCB_ATTR_IEEE_APP_UNSPEC,
186   DCB_ATTR_IEEE_APP,
187   __DCB_ATTR_IEEE_APP_MAX
188 };
189 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
190 enum cee_attrs {
191   DCB_ATTR_CEE_UNSPEC,
192   DCB_ATTR_CEE_PEER_PG,
193   DCB_ATTR_CEE_PEER_PFC,
194   DCB_ATTR_CEE_PEER_APP_TABLE,
195   DCB_ATTR_CEE_TX_PG,
196   DCB_ATTR_CEE_RX_PG,
197   DCB_ATTR_CEE_PFC,
198   DCB_ATTR_CEE_APP_TABLE,
199   DCB_ATTR_CEE_FEAT,
200   __DCB_ATTR_CEE_MAX
201 };
202 #define DCB_ATTR_CEE_MAX (__DCB_ATTR_CEE_MAX - 1)
203 enum peer_app_attr {
204   DCB_ATTR_CEE_PEER_APP_UNSPEC,
205   DCB_ATTR_CEE_PEER_APP_INFO,
206   DCB_ATTR_CEE_PEER_APP,
207   __DCB_ATTR_CEE_PEER_APP_MAX
208 };
209 #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
210 enum cee_attrs_app {
211   DCB_ATTR_CEE_APP_UNSPEC,
212   DCB_ATTR_CEE_APP,
213   __DCB_ATTR_CEE_APP_MAX
214 };
215 #define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1)
216 enum dcbnl_pfc_up_attrs {
217   DCB_PFC_UP_ATTR_UNDEFINED,
218   DCB_PFC_UP_ATTR_0,
219   DCB_PFC_UP_ATTR_1,
220   DCB_PFC_UP_ATTR_2,
221   DCB_PFC_UP_ATTR_3,
222   DCB_PFC_UP_ATTR_4,
223   DCB_PFC_UP_ATTR_5,
224   DCB_PFC_UP_ATTR_6,
225   DCB_PFC_UP_ATTR_7,
226   DCB_PFC_UP_ATTR_ALL,
227   __DCB_PFC_UP_ATTR_ENUM_MAX,
228   DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
229 };
230 enum dcbnl_pg_attrs {
231   DCB_PG_ATTR_UNDEFINED,
232   DCB_PG_ATTR_TC_0,
233   DCB_PG_ATTR_TC_1,
234   DCB_PG_ATTR_TC_2,
235   DCB_PG_ATTR_TC_3,
236   DCB_PG_ATTR_TC_4,
237   DCB_PG_ATTR_TC_5,
238   DCB_PG_ATTR_TC_6,
239   DCB_PG_ATTR_TC_7,
240   DCB_PG_ATTR_TC_MAX,
241   DCB_PG_ATTR_TC_ALL,
242   DCB_PG_ATTR_BW_ID_0,
243   DCB_PG_ATTR_BW_ID_1,
244   DCB_PG_ATTR_BW_ID_2,
245   DCB_PG_ATTR_BW_ID_3,
246   DCB_PG_ATTR_BW_ID_4,
247   DCB_PG_ATTR_BW_ID_5,
248   DCB_PG_ATTR_BW_ID_6,
249   DCB_PG_ATTR_BW_ID_7,
250   DCB_PG_ATTR_BW_ID_MAX,
251   DCB_PG_ATTR_BW_ID_ALL,
252   __DCB_PG_ATTR_ENUM_MAX,
253   DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
254 };
255 enum dcbnl_tc_attrs {
256   DCB_TC_ATTR_PARAM_UNDEFINED,
257   DCB_TC_ATTR_PARAM_PGID,
258   DCB_TC_ATTR_PARAM_UP_MAPPING,
259   DCB_TC_ATTR_PARAM_STRICT_PRIO,
260   DCB_TC_ATTR_PARAM_BW_PCT,
261   DCB_TC_ATTR_PARAM_ALL,
262   __DCB_TC_ATTR_PARAM_ENUM_MAX,
263   DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
264 };
265 enum dcbnl_cap_attrs {
266   DCB_CAP_ATTR_UNDEFINED,
267   DCB_CAP_ATTR_ALL,
268   DCB_CAP_ATTR_PG,
269   DCB_CAP_ATTR_PFC,
270   DCB_CAP_ATTR_UP2TC,
271   DCB_CAP_ATTR_PG_TCS,
272   DCB_CAP_ATTR_PFC_TCS,
273   DCB_CAP_ATTR_GSP,
274   DCB_CAP_ATTR_BCN,
275   DCB_CAP_ATTR_DCBX,
276   __DCB_CAP_ATTR_ENUM_MAX,
277   DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
278 };
279 #define DCB_CAP_DCBX_HOST 0x01
280 #define DCB_CAP_DCBX_LLD_MANAGED 0x02
281 #define DCB_CAP_DCBX_VER_CEE 0x04
282 #define DCB_CAP_DCBX_VER_IEEE 0x08
283 #define DCB_CAP_DCBX_STATIC 0x10
284 enum dcbnl_numtcs_attrs {
285   DCB_NUMTCS_ATTR_UNDEFINED,
286   DCB_NUMTCS_ATTR_ALL,
287   DCB_NUMTCS_ATTR_PG,
288   DCB_NUMTCS_ATTR_PFC,
289   __DCB_NUMTCS_ATTR_ENUM_MAX,
290   DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
291 };
292 enum dcbnl_bcn_attrs {
293   DCB_BCN_ATTR_UNDEFINED = 0,
294   DCB_BCN_ATTR_RP_0,
295   DCB_BCN_ATTR_RP_1,
296   DCB_BCN_ATTR_RP_2,
297   DCB_BCN_ATTR_RP_3,
298   DCB_BCN_ATTR_RP_4,
299   DCB_BCN_ATTR_RP_5,
300   DCB_BCN_ATTR_RP_6,
301   DCB_BCN_ATTR_RP_7,
302   DCB_BCN_ATTR_RP_ALL,
303   DCB_BCN_ATTR_BCNA_0,
304   DCB_BCN_ATTR_BCNA_1,
305   DCB_BCN_ATTR_ALPHA,
306   DCB_BCN_ATTR_BETA,
307   DCB_BCN_ATTR_GD,
308   DCB_BCN_ATTR_GI,
309   DCB_BCN_ATTR_TMAX,
310   DCB_BCN_ATTR_TD,
311   DCB_BCN_ATTR_RMIN,
312   DCB_BCN_ATTR_W,
313   DCB_BCN_ATTR_RD,
314   DCB_BCN_ATTR_RU,
315   DCB_BCN_ATTR_WRTT,
316   DCB_BCN_ATTR_RI,
317   DCB_BCN_ATTR_C,
318   DCB_BCN_ATTR_ALL,
319   __DCB_BCN_ATTR_ENUM_MAX,
320   DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
321 };
322 enum dcb_general_attr_values {
323   DCB_ATTR_VALUE_UNDEFINED = 0xff
324 };
325 #define DCB_APP_IDTYPE_ETHTYPE 0x00
326 #define DCB_APP_IDTYPE_PORTNUM 0x01
327 enum dcbnl_app_attrs {
328   DCB_APP_ATTR_UNDEFINED,
329   DCB_APP_ATTR_IDTYPE,
330   DCB_APP_ATTR_ID,
331   DCB_APP_ATTR_PRIORITY,
332   __DCB_APP_ATTR_ENUM_MAX,
333   DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
334 };
335 #define DCB_FEATCFG_ERROR 0x01
336 #define DCB_FEATCFG_ENABLE 0x02
337 #define DCB_FEATCFG_WILLING 0x04
338 #define DCB_FEATCFG_ADVERTISE 0x08
339 enum dcbnl_featcfg_attrs {
340   DCB_FEATCFG_ATTR_UNDEFINED,
341   DCB_FEATCFG_ATTR_ALL,
342   DCB_FEATCFG_ATTR_PG,
343   DCB_FEATCFG_ATTR_PFC,
344   DCB_FEATCFG_ATTR_APP,
345   __DCB_FEATCFG_ATTR_ENUM_MAX,
346   DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
347 };
348 #endif
349