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