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/const.h> 22 #include <linux/types.h> 23 #define TC_PRIO_BESTEFFORT 0 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 #define TC_PRIO_CONTROL 7 29 #define TC_PRIO_MAX 15 30 struct tc_stats { 31 __u64 bytes; 32 __u32 packets; 33 __u32 drops; 34 __u32 overlimits; 35 __u32 bps; 36 __u32 pps; 37 __u32 qlen; 38 __u32 backlog; 39 }; 40 struct tc_estimator { 41 signed char interval; 42 unsigned char ewma_log; 43 }; 44 #define TC_H_MAJ_MASK (0xFFFF0000U) 45 #define TC_H_MIN_MASK (0x0000FFFFU) 46 #define TC_H_MAJ(h) ((h) & TC_H_MAJ_MASK) 47 #define TC_H_MIN(h) ((h) & TC_H_MIN_MASK) 48 #define TC_H_MAKE(maj,min) (((maj) & TC_H_MAJ_MASK) | ((min) & TC_H_MIN_MASK)) 49 #define TC_H_UNSPEC (0U) 50 #define TC_H_ROOT (0xFFFFFFFFU) 51 #define TC_H_INGRESS (0xFFFFFFF1U) 52 #define TC_H_CLSACT TC_H_INGRESS 53 #define TC_H_MIN_PRIORITY 0xFFE0U 54 #define TC_H_MIN_INGRESS 0xFFF2U 55 #define TC_H_MIN_EGRESS 0xFFF3U 56 enum tc_link_layer { 57 TC_LINKLAYER_UNAWARE, 58 TC_LINKLAYER_ETHERNET, 59 TC_LINKLAYER_ATM, 60 }; 61 #define TC_LINKLAYER_MASK 0x0F 62 struct tc_ratespec { 63 unsigned char cell_log; 64 __u8 linklayer; 65 unsigned short overhead; 66 short cell_align; 67 unsigned short mpu; 68 __u32 rate; 69 }; 70 #define TC_RTAB_SIZE 1024 71 struct tc_sizespec { 72 unsigned char cell_log; 73 unsigned char size_log; 74 short cell_align; 75 int overhead; 76 unsigned int linklayer; 77 unsigned int mpu; 78 unsigned int mtu; 79 unsigned int tsize; 80 }; 81 enum { 82 TCA_STAB_UNSPEC, 83 TCA_STAB_BASE, 84 TCA_STAB_DATA, 85 __TCA_STAB_MAX 86 }; 87 #define TCA_STAB_MAX (__TCA_STAB_MAX - 1) 88 struct tc_fifo_qopt { 89 __u32 limit; 90 }; 91 #define SKBPRIO_MAX_PRIORITY 64 92 struct tc_skbprio_qopt { 93 __u32 limit; 94 }; 95 #define TCQ_PRIO_BANDS 16 96 #define TCQ_MIN_PRIO_BANDS 2 97 struct tc_prio_qopt { 98 int bands; 99 __u8 priomap[TC_PRIO_MAX + 1]; 100 }; 101 struct tc_multiq_qopt { 102 __u16 bands; 103 __u16 max_bands; 104 }; 105 #define TCQ_PLUG_BUFFER 0 106 #define TCQ_PLUG_RELEASE_ONE 1 107 #define TCQ_PLUG_RELEASE_INDEFINITE 2 108 #define TCQ_PLUG_LIMIT 3 109 struct tc_plug_qopt { 110 int action; 111 __u32 limit; 112 }; 113 struct tc_tbf_qopt { 114 struct tc_ratespec rate; 115 struct tc_ratespec peakrate; 116 __u32 limit; 117 __u32 buffer; 118 __u32 mtu; 119 }; 120 enum { 121 TCA_TBF_UNSPEC, 122 TCA_TBF_PARMS, 123 TCA_TBF_RTAB, 124 TCA_TBF_PTAB, 125 TCA_TBF_RATE64, 126 TCA_TBF_PRATE64, 127 TCA_TBF_BURST, 128 TCA_TBF_PBURST, 129 TCA_TBF_PAD, 130 __TCA_TBF_MAX, 131 }; 132 #define TCA_TBF_MAX (__TCA_TBF_MAX - 1) 133 struct tc_sfq_qopt { 134 unsigned quantum; 135 int perturb_period; 136 __u32 limit; 137 unsigned divisor; 138 unsigned flows; 139 }; 140 struct tc_sfqred_stats { 141 __u32 prob_drop; 142 __u32 forced_drop; 143 __u32 prob_mark; 144 __u32 forced_mark; 145 __u32 prob_mark_head; 146 __u32 forced_mark_head; 147 }; 148 struct tc_sfq_qopt_v1 { 149 struct tc_sfq_qopt v0; 150 unsigned int depth; 151 unsigned int headdrop; 152 __u32 limit; 153 __u32 qth_min; 154 __u32 qth_max; 155 unsigned char Wlog; 156 unsigned char Plog; 157 unsigned char Scell_log; 158 unsigned char flags; 159 __u32 max_P; 160 struct tc_sfqred_stats stats; 161 }; 162 struct tc_sfq_xstats { 163 __s32 allot; 164 }; 165 enum { 166 TCA_RED_UNSPEC, 167 TCA_RED_PARMS, 168 TCA_RED_STAB, 169 TCA_RED_MAX_P, 170 TCA_RED_FLAGS, 171 __TCA_RED_MAX, 172 }; 173 #define TCA_RED_MAX (__TCA_RED_MAX - 1) 174 struct tc_red_qopt { 175 __u32 limit; 176 __u32 qth_min; 177 __u32 qth_max; 178 unsigned char Wlog; 179 unsigned char Plog; 180 unsigned char Scell_log; 181 unsigned char flags; 182 #define TC_RED_ECN 1 183 #define TC_RED_HARDDROP 2 184 #define TC_RED_ADAPTATIVE 4 185 #define TC_RED_NODROP 8 186 }; 187 #define TC_RED_HISTORIC_FLAGS (TC_RED_ECN | TC_RED_HARDDROP | TC_RED_ADAPTATIVE) 188 struct tc_red_xstats { 189 __u32 early; 190 __u32 pdrop; 191 __u32 other; 192 __u32 marked; 193 }; 194 #define MAX_DPs 16 195 enum { 196 TCA_GRED_UNSPEC, 197 TCA_GRED_PARMS, 198 TCA_GRED_STAB, 199 TCA_GRED_DPS, 200 TCA_GRED_MAX_P, 201 TCA_GRED_LIMIT, 202 TCA_GRED_VQ_LIST, 203 __TCA_GRED_MAX, 204 }; 205 #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) 206 enum { 207 TCA_GRED_VQ_ENTRY_UNSPEC, 208 TCA_GRED_VQ_ENTRY, 209 __TCA_GRED_VQ_ENTRY_MAX, 210 }; 211 #define TCA_GRED_VQ_ENTRY_MAX (__TCA_GRED_VQ_ENTRY_MAX - 1) 212 enum { 213 TCA_GRED_VQ_UNSPEC, 214 TCA_GRED_VQ_PAD, 215 TCA_GRED_VQ_DP, 216 TCA_GRED_VQ_STAT_BYTES, 217 TCA_GRED_VQ_STAT_PACKETS, 218 TCA_GRED_VQ_STAT_BACKLOG, 219 TCA_GRED_VQ_STAT_PROB_DROP, 220 TCA_GRED_VQ_STAT_PROB_MARK, 221 TCA_GRED_VQ_STAT_FORCED_DROP, 222 TCA_GRED_VQ_STAT_FORCED_MARK, 223 TCA_GRED_VQ_STAT_PDROP, 224 TCA_GRED_VQ_STAT_OTHER, 225 TCA_GRED_VQ_FLAGS, 226 __TCA_GRED_VQ_MAX 227 }; 228 #define TCA_GRED_VQ_MAX (__TCA_GRED_VQ_MAX - 1) 229 struct tc_gred_qopt { 230 __u32 limit; 231 __u32 qth_min; 232 __u32 qth_max; 233 __u32 DP; 234 __u32 backlog; 235 __u32 qave; 236 __u32 forced; 237 __u32 early; 238 __u32 other; 239 __u32 pdrop; 240 __u8 Wlog; 241 __u8 Plog; 242 __u8 Scell_log; 243 __u8 prio; 244 __u32 packets; 245 __u32 bytesin; 246 }; 247 struct tc_gred_sopt { 248 __u32 DPs; 249 __u32 def_DP; 250 __u8 grio; 251 __u8 flags; 252 __u16 pad1; 253 }; 254 enum { 255 TCA_CHOKE_UNSPEC, 256 TCA_CHOKE_PARMS, 257 TCA_CHOKE_STAB, 258 TCA_CHOKE_MAX_P, 259 __TCA_CHOKE_MAX, 260 }; 261 #define TCA_CHOKE_MAX (__TCA_CHOKE_MAX - 1) 262 struct tc_choke_qopt { 263 __u32 limit; 264 __u32 qth_min; 265 __u32 qth_max; 266 unsigned char Wlog; 267 unsigned char Plog; 268 unsigned char Scell_log; 269 unsigned char flags; 270 }; 271 struct tc_choke_xstats { 272 __u32 early; 273 __u32 pdrop; 274 __u32 other; 275 __u32 marked; 276 __u32 matched; 277 }; 278 #define TC_HTB_NUMPRIO 8 279 #define TC_HTB_MAXDEPTH 8 280 #define TC_HTB_PROTOVER 3 281 struct tc_htb_opt { 282 struct tc_ratespec rate; 283 struct tc_ratespec ceil; 284 __u32 buffer; 285 __u32 cbuffer; 286 __u32 quantum; 287 __u32 level; 288 __u32 prio; 289 }; 290 struct tc_htb_glob { 291 __u32 version; 292 __u32 rate2quantum; 293 __u32 defcls; 294 __u32 debug; 295 __u32 direct_pkts; 296 }; 297 enum { 298 TCA_HTB_UNSPEC, 299 TCA_HTB_PARMS, 300 TCA_HTB_INIT, 301 TCA_HTB_CTAB, 302 TCA_HTB_RTAB, 303 TCA_HTB_DIRECT_QLEN, 304 TCA_HTB_RATE64, 305 TCA_HTB_CEIL64, 306 TCA_HTB_PAD, 307 __TCA_HTB_MAX, 308 }; 309 #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) 310 struct tc_htb_xstats { 311 __u32 lends; 312 __u32 borrows; 313 __u32 giants; 314 __s32 tokens; 315 __s32 ctokens; 316 }; 317 struct tc_hfsc_qopt { 318 __u16 defcls; 319 }; 320 struct tc_service_curve { 321 __u32 m1; 322 __u32 d; 323 __u32 m2; 324 }; 325 struct tc_hfsc_stats { 326 __u64 work; 327 __u64 rtwork; 328 __u32 period; 329 __u32 level; 330 }; 331 enum { 332 TCA_HFSC_UNSPEC, 333 TCA_HFSC_RSC, 334 TCA_HFSC_FSC, 335 TCA_HFSC_USC, 336 __TCA_HFSC_MAX, 337 }; 338 #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) 339 #define TC_CBQ_MAXPRIO 8 340 #define TC_CBQ_MAXLEVEL 8 341 #define TC_CBQ_DEF_EWMA 5 342 struct tc_cbq_lssopt { 343 unsigned char change; 344 unsigned char flags; 345 #define TCF_CBQ_LSS_BOUNDED 1 346 #define TCF_CBQ_LSS_ISOLATED 2 347 unsigned char ewma_log; 348 unsigned char level; 349 #define TCF_CBQ_LSS_FLAGS 1 350 #define TCF_CBQ_LSS_EWMA 2 351 #define TCF_CBQ_LSS_MAXIDLE 4 352 #define TCF_CBQ_LSS_MINIDLE 8 353 #define TCF_CBQ_LSS_OFFTIME 0x10 354 #define TCF_CBQ_LSS_AVPKT 0x20 355 __u32 maxidle; 356 __u32 minidle; 357 __u32 offtime; 358 __u32 avpkt; 359 }; 360 struct tc_cbq_wrropt { 361 unsigned char flags; 362 unsigned char priority; 363 unsigned char cpriority; 364 unsigned char __reserved; 365 __u32 allot; 366 __u32 weight; 367 }; 368 struct tc_cbq_ovl { 369 unsigned char strategy; 370 #define TC_CBQ_OVL_CLASSIC 0 371 #define TC_CBQ_OVL_DELAY 1 372 #define TC_CBQ_OVL_LOWPRIO 2 373 #define TC_CBQ_OVL_DROP 3 374 #define TC_CBQ_OVL_RCLASSIC 4 375 unsigned char priority2; 376 __u16 pad; 377 __u32 penalty; 378 }; 379 struct tc_cbq_police { 380 unsigned char police; 381 unsigned char __res1; 382 unsigned short __res2; 383 }; 384 struct tc_cbq_fopt { 385 __u32 split; 386 __u32 defmap; 387 __u32 defchange; 388 }; 389 struct tc_cbq_xstats { 390 __u32 borrows; 391 __u32 overactions; 392 __s32 avgidle; 393 __s32 undertime; 394 }; 395 enum { 396 TCA_CBQ_UNSPEC, 397 TCA_CBQ_LSSOPT, 398 TCA_CBQ_WRROPT, 399 TCA_CBQ_FOPT, 400 TCA_CBQ_OVL_STRATEGY, 401 TCA_CBQ_RATE, 402 TCA_CBQ_RTAB, 403 TCA_CBQ_POLICE, 404 __TCA_CBQ_MAX, 405 }; 406 #define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1) 407 enum { 408 TCA_DSMARK_UNSPEC, 409 TCA_DSMARK_INDICES, 410 TCA_DSMARK_DEFAULT_INDEX, 411 TCA_DSMARK_SET_TC_INDEX, 412 TCA_DSMARK_MASK, 413 TCA_DSMARK_VALUE, 414 __TCA_DSMARK_MAX, 415 }; 416 #define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) 417 enum { 418 TCA_ATM_UNSPEC, 419 TCA_ATM_FD, 420 TCA_ATM_PTR, 421 TCA_ATM_HDR, 422 TCA_ATM_EXCESS, 423 TCA_ATM_ADDR, 424 TCA_ATM_STATE, 425 __TCA_ATM_MAX, 426 }; 427 #define TCA_ATM_MAX (__TCA_ATM_MAX - 1) 428 enum { 429 TCA_NETEM_UNSPEC, 430 TCA_NETEM_CORR, 431 TCA_NETEM_DELAY_DIST, 432 TCA_NETEM_REORDER, 433 TCA_NETEM_CORRUPT, 434 TCA_NETEM_LOSS, 435 TCA_NETEM_RATE, 436 TCA_NETEM_ECN, 437 TCA_NETEM_RATE64, 438 TCA_NETEM_PAD, 439 TCA_NETEM_LATENCY64, 440 TCA_NETEM_JITTER64, 441 TCA_NETEM_SLOT, 442 TCA_NETEM_SLOT_DIST, 443 __TCA_NETEM_MAX, 444 }; 445 #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) 446 struct tc_netem_qopt { 447 __u32 latency; 448 __u32 limit; 449 __u32 loss; 450 __u32 gap; 451 __u32 duplicate; 452 __u32 jitter; 453 }; 454 struct tc_netem_corr { 455 __u32 delay_corr; 456 __u32 loss_corr; 457 __u32 dup_corr; 458 }; 459 struct tc_netem_reorder { 460 __u32 probability; 461 __u32 correlation; 462 }; 463 struct tc_netem_corrupt { 464 __u32 probability; 465 __u32 correlation; 466 }; 467 struct tc_netem_rate { 468 __u32 rate; 469 __s32 packet_overhead; 470 __u32 cell_size; 471 __s32 cell_overhead; 472 }; 473 struct tc_netem_slot { 474 __s64 min_delay; 475 __s64 max_delay; 476 __s32 max_packets; 477 __s32 max_bytes; 478 __s64 dist_delay; 479 __s64 dist_jitter; 480 }; 481 enum { 482 NETEM_LOSS_UNSPEC, 483 NETEM_LOSS_GI, 484 NETEM_LOSS_GE, 485 __NETEM_LOSS_MAX 486 }; 487 #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) 488 struct tc_netem_gimodel { 489 __u32 p13; 490 __u32 p31; 491 __u32 p32; 492 __u32 p14; 493 __u32 p23; 494 }; 495 struct tc_netem_gemodel { 496 __u32 p; 497 __u32 r; 498 __u32 h; 499 __u32 k1; 500 }; 501 #define NETEM_DIST_SCALE 8192 502 #define NETEM_DIST_MAX 16384 503 enum { 504 TCA_DRR_UNSPEC, 505 TCA_DRR_QUANTUM, 506 __TCA_DRR_MAX 507 }; 508 #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) 509 struct tc_drr_stats { 510 __u32 deficit; 511 }; 512 #define TC_QOPT_BITMASK 15 513 #define TC_QOPT_MAX_QUEUE 16 514 enum { 515 TC_MQPRIO_HW_OFFLOAD_NONE, 516 TC_MQPRIO_HW_OFFLOAD_TCS, 517 __TC_MQPRIO_HW_OFFLOAD_MAX 518 }; 519 #define TC_MQPRIO_HW_OFFLOAD_MAX (__TC_MQPRIO_HW_OFFLOAD_MAX - 1) 520 enum { 521 TC_MQPRIO_MODE_DCB, 522 TC_MQPRIO_MODE_CHANNEL, 523 __TC_MQPRIO_MODE_MAX 524 }; 525 #define __TC_MQPRIO_MODE_MAX (__TC_MQPRIO_MODE_MAX - 1) 526 enum { 527 TC_MQPRIO_SHAPER_DCB, 528 TC_MQPRIO_SHAPER_BW_RATE, 529 __TC_MQPRIO_SHAPER_MAX 530 }; 531 #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1) 532 struct tc_mqprio_qopt { 533 __u8 num_tc; 534 __u8 prio_tc_map[TC_QOPT_BITMASK + 1]; 535 __u8 hw; 536 __u16 count[TC_QOPT_MAX_QUEUE]; 537 __u16 offset[TC_QOPT_MAX_QUEUE]; 538 }; 539 #define TC_MQPRIO_F_MODE 0x1 540 #define TC_MQPRIO_F_SHAPER 0x2 541 #define TC_MQPRIO_F_MIN_RATE 0x4 542 #define TC_MQPRIO_F_MAX_RATE 0x8 543 enum { 544 TCA_MQPRIO_UNSPEC, 545 TCA_MQPRIO_MODE, 546 TCA_MQPRIO_SHAPER, 547 TCA_MQPRIO_MIN_RATE64, 548 TCA_MQPRIO_MAX_RATE64, 549 __TCA_MQPRIO_MAX, 550 }; 551 #define TCA_MQPRIO_MAX (__TCA_MQPRIO_MAX - 1) 552 enum { 553 TCA_SFB_UNSPEC, 554 TCA_SFB_PARMS, 555 __TCA_SFB_MAX, 556 }; 557 #define TCA_SFB_MAX (__TCA_SFB_MAX - 1) 558 struct tc_sfb_qopt { 559 __u32 rehash_interval; 560 __u32 warmup_time; 561 __u32 max; 562 __u32 bin_size; 563 __u32 increment; 564 __u32 decrement; 565 __u32 limit; 566 __u32 penalty_rate; 567 __u32 penalty_burst; 568 }; 569 struct tc_sfb_xstats { 570 __u32 earlydrop; 571 __u32 penaltydrop; 572 __u32 bucketdrop; 573 __u32 queuedrop; 574 __u32 childdrop; 575 __u32 marked; 576 __u32 maxqlen; 577 __u32 maxprob; 578 __u32 avgprob; 579 }; 580 #define SFB_MAX_PROB 0xFFFF 581 enum { 582 TCA_QFQ_UNSPEC, 583 TCA_QFQ_WEIGHT, 584 TCA_QFQ_LMAX, 585 __TCA_QFQ_MAX 586 }; 587 #define TCA_QFQ_MAX (__TCA_QFQ_MAX - 1) 588 struct tc_qfq_stats { 589 __u32 weight; 590 __u32 lmax; 591 }; 592 enum { 593 TCA_CODEL_UNSPEC, 594 TCA_CODEL_TARGET, 595 TCA_CODEL_LIMIT, 596 TCA_CODEL_INTERVAL, 597 TCA_CODEL_ECN, 598 TCA_CODEL_CE_THRESHOLD, 599 __TCA_CODEL_MAX 600 }; 601 #define TCA_CODEL_MAX (__TCA_CODEL_MAX - 1) 602 struct tc_codel_xstats { 603 __u32 maxpacket; 604 __u32 count; 605 __u32 lastcount; 606 __u32 ldelay; 607 __s32 drop_next; 608 __u32 drop_overlimit; 609 __u32 ecn_mark; 610 __u32 dropping; 611 __u32 ce_mark; 612 }; 613 enum { 614 TCA_FQ_CODEL_UNSPEC, 615 TCA_FQ_CODEL_TARGET, 616 TCA_FQ_CODEL_LIMIT, 617 TCA_FQ_CODEL_INTERVAL, 618 TCA_FQ_CODEL_ECN, 619 TCA_FQ_CODEL_FLOWS, 620 TCA_FQ_CODEL_QUANTUM, 621 TCA_FQ_CODEL_CE_THRESHOLD, 622 TCA_FQ_CODEL_DROP_BATCH_SIZE, 623 TCA_FQ_CODEL_MEMORY_LIMIT, 624 __TCA_FQ_CODEL_MAX 625 }; 626 #define TCA_FQ_CODEL_MAX (__TCA_FQ_CODEL_MAX - 1) 627 enum { 628 TCA_FQ_CODEL_XSTATS_QDISC, 629 TCA_FQ_CODEL_XSTATS_CLASS, 630 }; 631 struct tc_fq_codel_qd_stats { 632 __u32 maxpacket; 633 __u32 drop_overlimit; 634 __u32 ecn_mark; 635 __u32 new_flow_count; 636 __u32 new_flows_len; 637 __u32 old_flows_len; 638 __u32 ce_mark; 639 __u32 memory_usage; 640 __u32 drop_overmemory; 641 }; 642 struct tc_fq_codel_cl_stats { 643 __s32 deficit; 644 __u32 ldelay; 645 __u32 count; 646 __u32 lastcount; 647 __u32 dropping; 648 __s32 drop_next; 649 }; 650 struct tc_fq_codel_xstats { 651 __u32 type; 652 union { 653 struct tc_fq_codel_qd_stats qdisc_stats; 654 struct tc_fq_codel_cl_stats class_stats; 655 }; 656 }; 657 enum { 658 TCA_FQ_UNSPEC, 659 TCA_FQ_PLIMIT, 660 TCA_FQ_FLOW_PLIMIT, 661 TCA_FQ_QUANTUM, 662 TCA_FQ_INITIAL_QUANTUM, 663 TCA_FQ_RATE_ENABLE, 664 TCA_FQ_FLOW_DEFAULT_RATE, 665 TCA_FQ_FLOW_MAX_RATE, 666 TCA_FQ_BUCKETS_LOG, 667 TCA_FQ_FLOW_REFILL_DELAY, 668 TCA_FQ_ORPHAN_MASK, 669 TCA_FQ_LOW_RATE_THRESHOLD, 670 TCA_FQ_CE_THRESHOLD, 671 TCA_FQ_TIMER_SLACK, 672 __TCA_FQ_MAX 673 }; 674 #define TCA_FQ_MAX (__TCA_FQ_MAX - 1) 675 struct tc_fq_qd_stats { 676 __u64 gc_flows; 677 __u64 highprio_packets; 678 __u64 tcp_retrans; 679 __u64 throttled; 680 __u64 flows_plimit; 681 __u64 pkts_too_long; 682 __u64 allocation_errors; 683 __s64 time_next_delayed_flow; 684 __u32 flows; 685 __u32 inactive_flows; 686 __u32 throttled_flows; 687 __u32 unthrottle_latency_ns; 688 __u64 ce_mark; 689 }; 690 enum { 691 TCA_HHF_UNSPEC, 692 TCA_HHF_BACKLOG_LIMIT, 693 TCA_HHF_QUANTUM, 694 TCA_HHF_HH_FLOWS_LIMIT, 695 TCA_HHF_RESET_TIMEOUT, 696 TCA_HHF_ADMIT_BYTES, 697 TCA_HHF_EVICT_TIMEOUT, 698 TCA_HHF_NON_HH_WEIGHT, 699 __TCA_HHF_MAX 700 }; 701 #define TCA_HHF_MAX (__TCA_HHF_MAX - 1) 702 struct tc_hhf_xstats { 703 __u32 drop_overlimit; 704 __u32 hh_overlimit; 705 __u32 hh_tot_count; 706 __u32 hh_cur_count; 707 }; 708 enum { 709 TCA_PIE_UNSPEC, 710 TCA_PIE_TARGET, 711 TCA_PIE_LIMIT, 712 TCA_PIE_TUPDATE, 713 TCA_PIE_ALPHA, 714 TCA_PIE_BETA, 715 TCA_PIE_ECN, 716 TCA_PIE_BYTEMODE, 717 TCA_PIE_DQ_RATE_ESTIMATOR, 718 __TCA_PIE_MAX 719 }; 720 #define TCA_PIE_MAX (__TCA_PIE_MAX - 1) 721 struct tc_pie_xstats { 722 __u64 prob; 723 __u32 delay; 724 __u32 avg_dq_rate; 725 __u32 dq_rate_estimating; 726 __u32 packets_in; 727 __u32 dropped; 728 __u32 overlimit; 729 __u32 maxq; 730 __u32 ecn_mark; 731 }; 732 enum { 733 TCA_FQ_PIE_UNSPEC, 734 TCA_FQ_PIE_LIMIT, 735 TCA_FQ_PIE_FLOWS, 736 TCA_FQ_PIE_TARGET, 737 TCA_FQ_PIE_TUPDATE, 738 TCA_FQ_PIE_ALPHA, 739 TCA_FQ_PIE_BETA, 740 TCA_FQ_PIE_QUANTUM, 741 TCA_FQ_PIE_MEMORY_LIMIT, 742 TCA_FQ_PIE_ECN_PROB, 743 TCA_FQ_PIE_ECN, 744 TCA_FQ_PIE_BYTEMODE, 745 TCA_FQ_PIE_DQ_RATE_ESTIMATOR, 746 __TCA_FQ_PIE_MAX 747 }; 748 #define TCA_FQ_PIE_MAX (__TCA_FQ_PIE_MAX - 1) 749 struct tc_fq_pie_xstats { 750 __u32 packets_in; 751 __u32 dropped; 752 __u32 overlimit; 753 __u32 overmemory; 754 __u32 ecn_mark; 755 __u32 new_flow_count; 756 __u32 new_flows_len; 757 __u32 old_flows_len; 758 __u32 memory_usage; 759 }; 760 struct tc_cbs_qopt { 761 __u8 offload; 762 __u8 _pad[3]; 763 __s32 hicredit; 764 __s32 locredit; 765 __s32 idleslope; 766 __s32 sendslope; 767 }; 768 enum { 769 TCA_CBS_UNSPEC, 770 TCA_CBS_PARMS, 771 __TCA_CBS_MAX, 772 }; 773 #define TCA_CBS_MAX (__TCA_CBS_MAX - 1) 774 struct tc_etf_qopt { 775 __s32 delta; 776 __s32 clockid; 777 __u32 flags; 778 #define TC_ETF_DEADLINE_MODE_ON _BITUL(0) 779 #define TC_ETF_OFFLOAD_ON _BITUL(1) 780 #define TC_ETF_SKIP_SOCK_CHECK _BITUL(2) 781 }; 782 enum { 783 TCA_ETF_UNSPEC, 784 TCA_ETF_PARMS, 785 __TCA_ETF_MAX, 786 }; 787 #define TCA_ETF_MAX (__TCA_ETF_MAX - 1) 788 enum { 789 TCA_CAKE_UNSPEC, 790 TCA_CAKE_PAD, 791 TCA_CAKE_BASE_RATE64, 792 TCA_CAKE_DIFFSERV_MODE, 793 TCA_CAKE_ATM, 794 TCA_CAKE_FLOW_MODE, 795 TCA_CAKE_OVERHEAD, 796 TCA_CAKE_RTT, 797 TCA_CAKE_TARGET, 798 TCA_CAKE_AUTORATE, 799 TCA_CAKE_MEMORY, 800 TCA_CAKE_NAT, 801 TCA_CAKE_RAW, 802 TCA_CAKE_WASH, 803 TCA_CAKE_MPU, 804 TCA_CAKE_INGRESS, 805 TCA_CAKE_ACK_FILTER, 806 TCA_CAKE_SPLIT_GSO, 807 TCA_CAKE_FWMARK, 808 __TCA_CAKE_MAX 809 }; 810 #define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1) 811 enum { 812 __TCA_CAKE_STATS_INVALID, 813 TCA_CAKE_STATS_PAD, 814 TCA_CAKE_STATS_CAPACITY_ESTIMATE64, 815 TCA_CAKE_STATS_MEMORY_LIMIT, 816 TCA_CAKE_STATS_MEMORY_USED, 817 TCA_CAKE_STATS_AVG_NETOFF, 818 TCA_CAKE_STATS_MIN_NETLEN, 819 TCA_CAKE_STATS_MAX_NETLEN, 820 TCA_CAKE_STATS_MIN_ADJLEN, 821 TCA_CAKE_STATS_MAX_ADJLEN, 822 TCA_CAKE_STATS_TIN_STATS, 823 TCA_CAKE_STATS_DEFICIT, 824 TCA_CAKE_STATS_COBALT_COUNT, 825 TCA_CAKE_STATS_DROPPING, 826 TCA_CAKE_STATS_DROP_NEXT_US, 827 TCA_CAKE_STATS_P_DROP, 828 TCA_CAKE_STATS_BLUE_TIMER_US, 829 __TCA_CAKE_STATS_MAX 830 }; 831 #define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1) 832 enum { 833 __TCA_CAKE_TIN_STATS_INVALID, 834 TCA_CAKE_TIN_STATS_PAD, 835 TCA_CAKE_TIN_STATS_SENT_PACKETS, 836 TCA_CAKE_TIN_STATS_SENT_BYTES64, 837 TCA_CAKE_TIN_STATS_DROPPED_PACKETS, 838 TCA_CAKE_TIN_STATS_DROPPED_BYTES64, 839 TCA_CAKE_TIN_STATS_ACKS_DROPPED_PACKETS, 840 TCA_CAKE_TIN_STATS_ACKS_DROPPED_BYTES64, 841 TCA_CAKE_TIN_STATS_ECN_MARKED_PACKETS, 842 TCA_CAKE_TIN_STATS_ECN_MARKED_BYTES64, 843 TCA_CAKE_TIN_STATS_BACKLOG_PACKETS, 844 TCA_CAKE_TIN_STATS_BACKLOG_BYTES, 845 TCA_CAKE_TIN_STATS_THRESHOLD_RATE64, 846 TCA_CAKE_TIN_STATS_TARGET_US, 847 TCA_CAKE_TIN_STATS_INTERVAL_US, 848 TCA_CAKE_TIN_STATS_WAY_INDIRECT_HITS, 849 TCA_CAKE_TIN_STATS_WAY_MISSES, 850 TCA_CAKE_TIN_STATS_WAY_COLLISIONS, 851 TCA_CAKE_TIN_STATS_PEAK_DELAY_US, 852 TCA_CAKE_TIN_STATS_AVG_DELAY_US, 853 TCA_CAKE_TIN_STATS_BASE_DELAY_US, 854 TCA_CAKE_TIN_STATS_SPARSE_FLOWS, 855 TCA_CAKE_TIN_STATS_BULK_FLOWS, 856 TCA_CAKE_TIN_STATS_UNRESPONSIVE_FLOWS, 857 TCA_CAKE_TIN_STATS_MAX_SKBLEN, 858 TCA_CAKE_TIN_STATS_FLOW_QUANTUM, 859 __TCA_CAKE_TIN_STATS_MAX 860 }; 861 #define TCA_CAKE_TIN_STATS_MAX (__TCA_CAKE_TIN_STATS_MAX - 1) 862 #define TC_CAKE_MAX_TINS (8) 863 enum { 864 CAKE_FLOW_NONE = 0, 865 CAKE_FLOW_SRC_IP, 866 CAKE_FLOW_DST_IP, 867 CAKE_FLOW_HOSTS, 868 CAKE_FLOW_FLOWS, 869 CAKE_FLOW_DUAL_SRC, 870 CAKE_FLOW_DUAL_DST, 871 CAKE_FLOW_TRIPLE, 872 CAKE_FLOW_MAX, 873 }; 874 enum { 875 CAKE_DIFFSERV_DIFFSERV3 = 0, 876 CAKE_DIFFSERV_DIFFSERV4, 877 CAKE_DIFFSERV_DIFFSERV8, 878 CAKE_DIFFSERV_BESTEFFORT, 879 CAKE_DIFFSERV_PRECEDENCE, 880 CAKE_DIFFSERV_MAX 881 }; 882 enum { 883 CAKE_ACK_NONE = 0, 884 CAKE_ACK_FILTER, 885 CAKE_ACK_AGGRESSIVE, 886 CAKE_ACK_MAX 887 }; 888 enum { 889 CAKE_ATM_NONE = 0, 890 CAKE_ATM_ATM, 891 CAKE_ATM_PTM, 892 CAKE_ATM_MAX 893 }; 894 enum { 895 TC_TAPRIO_CMD_SET_GATES = 0x00, 896 TC_TAPRIO_CMD_SET_AND_HOLD = 0x01, 897 TC_TAPRIO_CMD_SET_AND_RELEASE = 0x02, 898 }; 899 enum { 900 TCA_TAPRIO_SCHED_ENTRY_UNSPEC, 901 TCA_TAPRIO_SCHED_ENTRY_INDEX, 902 TCA_TAPRIO_SCHED_ENTRY_CMD, 903 TCA_TAPRIO_SCHED_ENTRY_GATE_MASK, 904 TCA_TAPRIO_SCHED_ENTRY_INTERVAL, 905 __TCA_TAPRIO_SCHED_ENTRY_MAX, 906 }; 907 #define TCA_TAPRIO_SCHED_ENTRY_MAX (__TCA_TAPRIO_SCHED_ENTRY_MAX - 1) 908 enum { 909 TCA_TAPRIO_SCHED_UNSPEC, 910 TCA_TAPRIO_SCHED_ENTRY, 911 __TCA_TAPRIO_SCHED_MAX, 912 }; 913 #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) 914 #define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST _BITUL(0) 915 #define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD _BITUL(1) 916 enum { 917 TCA_TAPRIO_ATTR_UNSPEC, 918 TCA_TAPRIO_ATTR_PRIOMAP, 919 TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST, 920 TCA_TAPRIO_ATTR_SCHED_BASE_TIME, 921 TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, 922 TCA_TAPRIO_ATTR_SCHED_CLOCKID, 923 TCA_TAPRIO_PAD, 924 TCA_TAPRIO_ATTR_ADMIN_SCHED, 925 TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, 926 TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, 927 TCA_TAPRIO_ATTR_FLAGS, 928 TCA_TAPRIO_ATTR_TXTIME_DELAY, 929 __TCA_TAPRIO_ATTR_MAX, 930 }; 931 #define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1) 932 #define TCQ_ETS_MAX_BANDS 16 933 enum { 934 TCA_ETS_UNSPEC, 935 TCA_ETS_NBANDS, 936 TCA_ETS_NSTRICT, 937 TCA_ETS_QUANTA, 938 TCA_ETS_QUANTA_BAND, 939 TCA_ETS_PRIOMAP, 940 TCA_ETS_PRIOMAP_BAND, 941 __TCA_ETS_MAX, 942 }; 943 #define TCA_ETS_MAX (__TCA_ETS_MAX - 1) 944 #endif 945