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_PKT_SCHED_H
20#define __LINUX_PKT_SCHED_H
21#include <linux/types.h>
22#define TC_PRIO_BESTEFFORT 0
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define TC_PRIO_FILLER 1
25#define TC_PRIO_BULK 2
26#define TC_PRIO_INTERACTIVE_BULK 4
27#define TC_PRIO_INTERACTIVE 6
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define TC_PRIO_CONTROL 7
30#define TC_PRIO_MAX 15
31struct tc_stats
32{
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 __u64 bytes;
35 __u32 packets;
36 __u32 drops;
37 __u32 overlimits;
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 __u32 bps;
40 __u32 pps;
41 __u32 qlen;
42 __u32 backlog;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44};
45struct tc_estimator
46{
47 signed char interval;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 unsigned char ewma_log;
50};
51#define TC_H_MAJ_MASK (0xFFFF0000U)
52#define TC_H_MIN_MASK (0x0000FFFFU)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
55#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
56#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
57#define TC_H_UNSPEC (0U)
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define TC_H_ROOT (0xFFFFFFFFU)
60#define TC_H_INGRESS (0xFFFFFFF1U)
61struct tc_ratespec
62{
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 unsigned char cell_log;
65 unsigned char __reserved;
66 unsigned short overhead;
67 short cell_align;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 unsigned short mpu;
70 __u32 rate;
71};
72#define TC_RTAB_SIZE 1024
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74struct tc_sizespec {
75 unsigned char cell_log;
76 unsigned char size_log;
77 short cell_align;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 int overhead;
80 unsigned int linklayer;
81 unsigned int mpu;
82 unsigned int mtu;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 unsigned int tsize;
85};
86enum {
87 TCA_STAB_UNSPEC,
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 TCA_STAB_BASE,
90 TCA_STAB_DATA,
91 __TCA_STAB_MAX
92};
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define TCA_STAB_MAX (__TCA_STAB_MAX - 1)
95struct tc_fifo_qopt
96{
97 __u32 limit;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99};
100#define TCQ_PRIO_BANDS 16
101#define TCQ_MIN_PRIO_BANDS 2
102struct tc_prio_qopt
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104{
105 int bands;
106 __u8 priomap[TC_PRIO_MAX+1];
107};
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109struct tc_multiq_qopt {
110 __u16 bands;
111 __u16 max_bands;
112};
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114struct tc_tbf_qopt
115{
116 struct tc_ratespec rate;
117 struct tc_ratespec peakrate;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 __u32 limit;
120 __u32 buffer;
121 __u32 mtu;
122};
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124enum
125{
126 TCA_TBF_UNSPEC,
127 TCA_TBF_PARMS,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 TCA_TBF_RTAB,
130 TCA_TBF_PTAB,
131 __TCA_TBF_MAX,
132};
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define TCA_TBF_MAX (__TCA_TBF_MAX - 1)
135struct tc_sfq_qopt
136{
137 unsigned quantum;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 int perturb_period;
140 __u32 limit;
141 unsigned divisor;
142 unsigned flows;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144};
145struct tc_sfq_xstats
146{
147 __s32 allot;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149};
150enum
151{
152 TCA_RED_UNSPEC,
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 TCA_RED_PARMS,
155 TCA_RED_STAB,
156 __TCA_RED_MAX,
157};
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159#define TCA_RED_MAX (__TCA_RED_MAX - 1)
160struct tc_red_qopt
161{
162 __u32 limit;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 __u32 qth_min;
165 __u32 qth_max;
166 unsigned char Wlog;
167 unsigned char Plog;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 unsigned char Scell_log;
170 unsigned char flags;
171#define TC_RED_ECN 1
172#define TC_RED_HARDDROP 2
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174};
175struct tc_red_xstats
176{
177 __u32 early;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 __u32 pdrop;
180 __u32 other;
181 __u32 marked;
182};
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184#define MAX_DPs 16
185enum
186{
187 TCA_GRED_UNSPEC,
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 TCA_GRED_PARMS,
190 TCA_GRED_STAB,
191 TCA_GRED_DPS,
192 __TCA_GRED_MAX,
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194};
195#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
196struct tc_gred_qopt
197{
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 __u32 limit;
200 __u32 qth_min;
201 __u32 qth_max;
202 __u32 DP;
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 __u32 backlog;
205 __u32 qave;
206 __u32 forced;
207 __u32 early;
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 __u32 other;
210 __u32 pdrop;
211 __u8 Wlog;
212 __u8 Plog;
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 __u8 Scell_log;
215 __u8 prio;
216 __u32 packets;
217 __u32 bytesin;
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219};
220struct tc_gred_sopt
221{
222 __u32 DPs;
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 __u32 def_DP;
225 __u8 grio;
226 __u8 flags;
227 __u16 pad1;
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229};
230#define TC_HTB_NUMPRIO 8
231#define TC_HTB_MAXDEPTH 8
232#define TC_HTB_PROTOVER 3
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234struct tc_htb_opt
235{
236 struct tc_ratespec rate;
237 struct tc_ratespec ceil;
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 __u32 buffer;
240 __u32 cbuffer;
241 __u32 quantum;
242 __u32 level;
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 __u32 prio;
245};
246struct tc_htb_glob
247{
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 __u32 version;
250 __u32 rate2quantum;
251 __u32 defcls;
252 __u32 debug;
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 __u32 direct_pkts;
255};
256enum
257{
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 TCA_HTB_UNSPEC,
260 TCA_HTB_PARMS,
261 TCA_HTB_INIT,
262 TCA_HTB_CTAB,
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 TCA_HTB_RTAB,
265 __TCA_HTB_MAX,
266};
267#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269struct tc_htb_xstats
270{
271 __u32 lends;
272 __u32 borrows;
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 __u32 giants;
275 __u32 tokens;
276 __u32 ctokens;
277};
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279struct tc_hfsc_qopt
280{
281 __u16 defcls;
282};
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284struct tc_service_curve
285{
286 __u32 m1;
287 __u32 d;
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 __u32 m2;
290};
291struct tc_hfsc_stats
292{
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294 __u64 work;
295 __u64 rtwork;
296 __u32 period;
297 __u32 level;
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299};
300enum
301{
302 TCA_HFSC_UNSPEC,
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304 TCA_HFSC_RSC,
305 TCA_HFSC_FSC,
306 TCA_HFSC_USC,
307 __TCA_HFSC_MAX,
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309};
310#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1)
311#define TC_CBQ_MAXPRIO 8
312#define TC_CBQ_MAXLEVEL 8
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314#define TC_CBQ_DEF_EWMA 5
315struct tc_cbq_lssopt
316{
317 unsigned char change;
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 unsigned char flags;
320#define TCF_CBQ_LSS_BOUNDED 1
321#define TCF_CBQ_LSS_ISOLATED 2
322 unsigned char ewma_log;
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 unsigned char level;
325#define TCF_CBQ_LSS_FLAGS 1
326#define TCF_CBQ_LSS_EWMA 2
327#define TCF_CBQ_LSS_MAXIDLE 4
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329#define TCF_CBQ_LSS_MINIDLE 8
330#define TCF_CBQ_LSS_OFFTIME 0x10
331#define TCF_CBQ_LSS_AVPKT 0x20
332 __u32 maxidle;
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 __u32 minidle;
335 __u32 offtime;
336 __u32 avpkt;
337};
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339struct tc_cbq_wrropt
340{
341 unsigned char flags;
342 unsigned char priority;
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344 unsigned char cpriority;
345 unsigned char __reserved;
346 __u32 allot;
347 __u32 weight;
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349};
350struct tc_cbq_ovl
351{
352 unsigned char strategy;
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354#define TC_CBQ_OVL_CLASSIC 0
355#define TC_CBQ_OVL_DELAY 1
356#define TC_CBQ_OVL_LOWPRIO 2
357#define TC_CBQ_OVL_DROP 3
358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359#define TC_CBQ_OVL_RCLASSIC 4
360 unsigned char priority2;
361 __u16 pad;
362 __u32 penalty;
363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364};
365struct tc_cbq_police
366{
367 unsigned char police;
368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 unsigned char __res1;
370 unsigned short __res2;
371};
372struct tc_cbq_fopt
373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374{
375 __u32 split;
376 __u32 defmap;
377 __u32 defchange;
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379};
380struct tc_cbq_xstats
381{
382 __u32 borrows;
383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384 __u32 overactions;
385 __s32 avgidle;
386 __s32 undertime;
387};
388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389enum
390{
391 TCA_CBQ_UNSPEC,
392 TCA_CBQ_LSSOPT,
393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394 TCA_CBQ_WRROPT,
395 TCA_CBQ_FOPT,
396 TCA_CBQ_OVL_STRATEGY,
397 TCA_CBQ_RATE,
398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399 TCA_CBQ_RTAB,
400 TCA_CBQ_POLICE,
401 __TCA_CBQ_MAX,
402};
403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404#define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1)
405enum {
406 TCA_DSMARK_UNSPEC,
407 TCA_DSMARK_INDICES,
408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409 TCA_DSMARK_DEFAULT_INDEX,
410 TCA_DSMARK_SET_TC_INDEX,
411 TCA_DSMARK_MASK,
412 TCA_DSMARK_VALUE,
413/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414 __TCA_DSMARK_MAX,
415};
416#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
417enum {
418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419 TCA_ATM_UNSPEC,
420 TCA_ATM_FD,
421 TCA_ATM_PTR,
422 TCA_ATM_HDR,
423/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424 TCA_ATM_EXCESS,
425 TCA_ATM_ADDR,
426 TCA_ATM_STATE,
427 __TCA_ATM_MAX,
428/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429};
430#define TCA_ATM_MAX (__TCA_ATM_MAX - 1)
431enum
432{
433/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434 TCA_NETEM_UNSPEC,
435 TCA_NETEM_CORR,
436 TCA_NETEM_DELAY_DIST,
437 TCA_NETEM_REORDER,
438/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439 TCA_NETEM_CORRUPT,
440 __TCA_NETEM_MAX,
441};
442#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
443/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444struct tc_netem_qopt
445{
446 __u32 latency;
447 __u32 limit;
448/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449 __u32 loss;
450 __u32 gap;
451 __u32 duplicate;
452 __u32 jitter;
453/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454};
455struct tc_netem_corr
456{
457 __u32 delay_corr;
458/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459 __u32 loss_corr;
460 __u32 dup_corr;
461};
462struct tc_netem_reorder
463/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
464{
465 __u32 probability;
466 __u32 correlation;
467};
468/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
469struct tc_netem_corrupt
470{
471 __u32 probability;
472 __u32 correlation;
473/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
474};
475#define NETEM_DIST_SCALE 8192
476enum
477{
478/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
479 TCA_DRR_UNSPEC,
480 TCA_DRR_QUANTUM,
481 __TCA_DRR_MAX
482};
483/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
484#define TCA_DRR_MAX (__TCA_DRR_MAX - 1)
485struct tc_drr_stats
486{
487 __u32 deficit;
488/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
489};
490#endif
491