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